Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
c9def945
Commit
c9def945
authored
Apr 16, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
User blocking improved. Admin area styled
parent
c0df0cd7
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
231 additions
and
109 deletions
+231
-109
CHANGELOG
CHANGELOG
+8
-0
app/assets/stylesheets/gitlab_bootstrap.scss
app/assets/stylesheets/gitlab_bootstrap.scss
+14
-0
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+23
-5
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+9
-0
app/models/user.rb
app/models/user.rb
+30
-0
app/views/admin/projects/index.html.haml
app/views/admin/projects/index.html.haml
+1
-1
app/views/admin/projects/show.html.haml
app/views/admin/projects/show.html.haml
+37
-38
app/views/admin/users/_form.html.haml
app/views/admin/users/_form.html.haml
+48
-34
app/views/admin/users/index.html.haml
app/views/admin/users/index.html.haml
+22
-4
app/views/admin/users/show.html.haml
app/views/admin/users/show.html.haml
+35
-25
app/views/help/index.html.haml
app/views/help/index.html.haml
+1
-1
app/views/layouts/admin.html.haml
app/views/layouts/admin.html.haml
+1
-1
config/routes.rb
config/routes.rb
+2
-0
No files found.
CHANGELOG
View file @
c9def945
v 2.4.0
v 2.4.0
- Ability to block user
- Simplified dashboard area
- Improved admin area
- Accept merge request
- Accept merge request
- Bootstrap 2.0
- Responsive layout
- Big commits handling
- Perfomance improved
- Milestones
v 2.3.1
v 2.3.1
- Issues pagination
- Issues pagination
...
...
app/assets/stylesheets/gitlab_bootstrap.scss
View file @
c9def945
...
@@ -450,3 +450,17 @@ form {
...
@@ -450,3 +450,17 @@ form {
}
}
}
}
table
.admin-table
{
@extend
.table-bordered
;
@extend
.zebra-striped
;
th
{
border-color
:
#CCC
;
border-bottom
:
1px
solid
#bbb
;
background
:
#eee
;
background-image
:
-webkit-gradient
(
linear
,
0
0
,
0
30
,
color-stop
(
0
.066
,
#eee
)
,
to
(
#dfdfdf
));
background-image
:
-webkit-linear-gradient
(
#eee
6
.6%
,
#dfdfdf
);
background-image
:
-moz-linear-gradient
(
#eee
6
.6%
,
#dfdfdf
);
background-image
:
-o-linear-gradient
(
#eee
6
.6%
,
#dfdfdf
);
}
}
app/controllers/admin/users_controller.rb
View file @
c9def945
...
@@ -4,7 +4,9 @@ class Admin::UsersController < ApplicationController
...
@@ -4,7 +4,9 @@ class Admin::UsersController < ApplicationController
before_filter
:authenticate_admin!
before_filter
:authenticate_admin!
def
index
def
index
@admin_users
=
User
.
page
(
params
[
:page
])
@admin_users
=
User
.
scoped
@admin_users
=
@admin_users
.
filter
(
params
[
:filter
])
@admin_users
=
@admin_users
.
order
(
"updated_at DESC"
).
page
(
params
[
:page
])
end
end
def
show
def
show
...
@@ -38,13 +40,31 @@ class Admin::UsersController < ApplicationController
...
@@ -38,13 +40,31 @@ class Admin::UsersController < ApplicationController
@admin_user
=
User
.
find
(
params
[
:id
])
@admin_user
=
User
.
find
(
params
[
:id
])
end
end
def
block
@admin_user
=
User
.
find
(
params
[
:id
])
if
@admin_user
.
block
redirect_to
:back
,
alert:
"Successfully blocked"
else
redirect_to
:back
,
alert:
"Error occured. User was not blocked"
end
end
def
unblock
@admin_user
=
User
.
find
(
params
[
:id
])
if
@admin_user
.
update_attribute
(
:blocked
,
false
)
redirect_to
:back
,
alert:
"Successfully unblocked"
else
redirect_to
:back
,
alert:
"Error occured. User was not unblocked"
end
end
def
create
def
create
admin
=
params
[
:user
].
delete
(
"admin"
)
admin
=
params
[
:user
].
delete
(
"admin"
)
blocked
=
params
[
:user
].
delete
(
"blocked"
)
@admin_user
=
User
.
new
(
params
[
:user
])
@admin_user
=
User
.
new
(
params
[
:user
])
@admin_user
.
admin
=
(
admin
&&
admin
.
to_i
>
0
)
@admin_user
.
admin
=
(
admin
&&
admin
.
to_i
>
0
)
@admin_user
.
blocked
=
blocked
respond_to
do
|
format
|
respond_to
do
|
format
|
if
@admin_user
.
save
if
@admin_user
.
save
...
@@ -59,7 +79,6 @@ class Admin::UsersController < ApplicationController
...
@@ -59,7 +79,6 @@ class Admin::UsersController < ApplicationController
def
update
def
update
admin
=
params
[
:user
].
delete
(
"admin"
)
admin
=
params
[
:user
].
delete
(
"admin"
)
blocked
=
params
[
:user
].
delete
(
"blocked"
)
if
params
[
:user
][
:password
].
blank?
if
params
[
:user
][
:password
].
blank?
params
[
:user
].
delete
(
:password
)
params
[
:user
].
delete
(
:password
)
...
@@ -68,7 +87,6 @@ class Admin::UsersController < ApplicationController
...
@@ -68,7 +87,6 @@ class Admin::UsersController < ApplicationController
@admin_user
=
User
.
find
(
params
[
:id
])
@admin_user
=
User
.
find
(
params
[
:id
])
@admin_user
.
admin
=
(
admin
&&
admin
.
to_i
>
0
)
@admin_user
.
admin
=
(
admin
&&
admin
.
to_i
>
0
)
@admin_user
.
blocked
=
blocked
respond_to
do
|
format
|
respond_to
do
|
format
|
if
@admin_user
.
update_attributes
(
params
[
:user
])
if
@admin_user
.
update_attributes
(
params
[
:user
])
...
...
app/controllers/application_controller.rb
View file @
c9def945
class
ApplicationController
<
ActionController
::
Base
class
ApplicationController
<
ActionController
::
Base
before_filter
:authenticate_user!
before_filter
:authenticate_user!
before_filter
:reject_blocked!
before_filter
:set_current_user_for_mailer
before_filter
:set_current_user_for_mailer
protect_from_forgery
protect_from_forgery
helper_method
:abilities
,
:can?
helper_method
:abilities
,
:can?
...
@@ -16,6 +17,14 @@ class ApplicationController < ActionController::Base
...
@@ -16,6 +17,14 @@ class ApplicationController < ActionController::Base
protected
protected
def
reject_blocked!
if
current_user
&&
current_user
.
blocked
sign_out
current_user
flash
[
:alert
]
=
"Your account was blocked"
redirect_to
new_user_session_path
end
end
def
after_sign_in_path_for
resource
def
after_sign_in_path_for
resource
if
resource
.
is_a?
(
User
)
&&
resource
.
respond_to?
(
:blocked
)
&&
resource
.
blocked
if
resource
.
is_a?
(
User
)
&&
resource
.
respond_to?
(
:blocked
)
&&
resource
.
blocked
sign_out
resource
sign_out
resource
...
...
app/models/user.rb
View file @
c9def945
...
@@ -48,7 +48,25 @@ class User < ActiveRecord::Base
...
@@ -48,7 +48,25 @@ class User < ActiveRecord::Base
before_create
:ensure_authentication_token
before_create
:ensure_authentication_token
alias_attribute
:private_token
,
:authentication_token
alias_attribute
:private_token
,
:authentication_token
scope
:not_in_project
,
lambda
{
|
project
|
where
(
"id not in (:ids)"
,
:ids
=>
project
.
users
.
map
(
&
:id
)
)
}
scope
:not_in_project
,
lambda
{
|
project
|
where
(
"id not in (:ids)"
,
:ids
=>
project
.
users
.
map
(
&
:id
)
)
}
scope
:admins
,
where
(
:admin
=>
true
)
scope
:blocked
,
where
(
:blocked
=>
true
)
scope
:active
,
where
(
:blocked
=>
false
)
def
self
.
filter
filter_name
case
filter_name
when
"admins"
;
self
.
admins
when
"blocked"
;
self
.
blocked
when
"wop"
;
self
.
without_projects
else
self
.
active
end
end
def
self
.
without_projects
where
(
'id NOT IN (SELECT DISTINCT(user_id) FROM users_projects)'
)
end
def
identifier
def
identifier
email
.
gsub
/[@.]/
,
"_"
email
.
gsub
/[@.]/
,
"_"
...
@@ -58,6 +76,7 @@ class User < ActiveRecord::Base
...
@@ -58,6 +76,7 @@ class User < ActiveRecord::Base
admin
admin
end
end
def
require_ssh_key?
def
require_ssh_key?
keys
.
count
==
0
keys
.
count
==
0
end
end
...
@@ -101,6 +120,17 @@ class User < ActiveRecord::Base
...
@@ -101,6 +120,17 @@ class User < ActiveRecord::Base
def
project_ids
def
project_ids
projects
.
map
(
&
:id
)
projects
.
map
(
&
:id
)
end
end
# Remove user from all projects and
# set blocked attribute to true
def
block
users_projects
.
all
.
each
do
|
membership
|
return
false
unless
membership
.
destroy
end
self
.
blocked
=
true
save
end
end
end
# == Schema Information
# == Schema Information
#
#
...
...
app/views/admin/projects/index.html.haml
View file @
c9def945
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
Projects
Projects
=
link_to
'New Project'
,
new_admin_project_path
,
:class
=>
"btn small right"
=
link_to
'New Project'
,
new_admin_project_path
,
:class
=>
"btn small right"
%br
%br
%table
.
zebra-striped.table-bordered
%table
.
admin-table
%thead
%thead
%th
Name
%th
Name
%th
Path
%th
Path
...
...
app/views/admin/projects/show.html.haml
View file @
c9def945
...
@@ -2,9 +2,8 @@
...
@@ -2,9 +2,8 @@
=
@admin_project
.
name
=
@admin_project
.
name
=
link_to
'Edit'
,
edit_admin_project_path
(
@admin_project
),
:class
=>
"btn right small"
=
link_to
'Edit'
,
edit_admin_project_path
(
@admin_project
),
:class
=>
"btn right small"
%hr
%br
%table
.zebra-striped.table-bordered
%table
.zebra-striped
%tr
%tr
%td
%td
%b
%b
...
@@ -29,18 +28,13 @@
...
@@ -29,18 +28,13 @@
Description:
Description:
%td
%td
=
@admin_project
.
description
=
@admin_project
.
description
%br
%h3
.span12
%h3
Team
Team
%small
%small
(
#{
@admin_project
.
users_projects
.
count
}
)
(
#{
@admin_project
.
users_projects
.
count
}
)
%br
%hr
%table
.zebra-striped.table-bordered
%table
.zebra-striped
%thead
%thead
%tr
%tr
%th
Name
%th
Name
...
@@ -56,20 +50,25 @@
...
@@ -56,20 +50,25 @@
%td
=
link_to
'Edit Access'
,
edit_admin_team_member_path
(
tm
),
:class
=>
"btn small"
%td
=
link_to
'Edit Access'
,
edit_admin_team_member_path
(
tm
),
:class
=>
"btn small"
%td
=
link_to
'Remove from team'
,
admin_team_member_path
(
tm
),
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"btn danger small"
%td
=
link_to
'Remove from team'
,
admin_team_member_path
(
tm
),
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"btn danger small"
=
form_tag
team_update_admin_project_path
(
@admin_project
),
:class
=>
"bulk_import"
,
:method
=>
:put
do
%br
%table
%h3
Add new team member
%br
=
form_tag
team_update_admin_project_path
(
@admin_project
),
:class
=>
"bulk_import"
,
:method
=>
:put
do
%table
.zebra-striped.table-bordered
%thead
%thead
%tr
%tr
%th
Users
%th
Users
%th
Project Access:
%th
Project Access:
%th
Repo Access:
%tr
%tr
%td
=
select_tag
:user_ids
,
options_from_collection_for_select
(
@users
,
:id
,
:name
),
:multiple
=>
true
%td
=
select_tag
:user_ids
,
options_from_collection_for_select
(
@users
,
:id
,
:name
),
:multiple
=>
true
%td
=
select_tag
:project_access
,
options_for_select
(
Project
.
access_options
),
:class
=>
"project-access-select"
%td
=
select_tag
:project_access
,
options_for_select
(
Project
.
access_options
),
:class
=>
"project-access-select"
.actions
%tr
=
submit_tag
'Add'
,
:class
=>
"btn primary"
%td
=
submit_tag
'Add'
,
:class
=>
"btn primary"
%td
Read more about project permissions
%strong
=
link_to
"here"
,
help_permissions_path
,
:class
=>
"vlink"
:css
:css
form
select
{
form
select
{
...
...
app/views/admin/users/_form.html.haml
View file @
c9def945
...
@@ -6,23 +6,25 @@
...
@@ -6,23 +6,25 @@
-
@admin_user
.
errors
.
full_messages
.
each
do
|
msg
|
-
@admin_user
.
errors
.
full_messages
.
each
do
|
msg
|
%li
=
msg
%li
=
msg
.row
.span6
.clearfix
.clearfix
=
f
.
label
:name
=
f
.
label
:name
.input
=
f
.
text_field
:name
.input
=
f
.
text_field
:name
%span
.help-inline
* requried
.clearfix
.clearfix
=
f
.
label
:email
=
f
.
label
:email
.input
=
f
.
text_field
:email
.input
=
f
.
text_field
:email
%span
.help-inline
* requried
.clearfix
.clearfix
=
f
.
label
:password
=
f
.
label
:password
.input
=
f
.
password_field
:password
.input
=
f
.
password_field
:password
.clearfix
.clearfix
=
f
.
label
:password_confirmation
=
f
.
label
:password_confirmation
.input
=
f
.
password_field
:password_confirmation
.input
=
f
.
password_field
:password_confirmation
%hr
.clearfix
=
f
.
label
:projects_limit
.input
=
f
.
text_field
:projects_limit
,
:class
=>
"small_input"
.clearfix
.clearfix
=
f
.
label
:skype
=
f
.
label
:skype
.input
=
f
.
text_field
:skype
.input
=
f
.
text_field
:skype
...
@@ -32,15 +34,27 @@
...
@@ -32,15 +34,27 @@
.clearfix
.clearfix
=
f
.
label
:twitter
=
f
.
label
:twitter
.input
=
f
.
text_field
:twitter
.input
=
f
.
text_field
:twitter
%hr
.span6
.clearfix
.clearfix
=
f
.
label
:admin
do
=
f
.
label
:projects_limit
.input
=
f
.
text_field
:projects_limit
,
:class
=>
"small_input"
.alert
.clearfix
%p
Give user ability to manage application.
=
f
.
label
:admin
,
:class
=>
"checkbox"
do
=
f
.
check_box
:admin
=
f
.
check_box
:admin
%span
Administrator
%span
Administrator
.clearfix
-
unless
@admin_user
.
new_record?
=
f
.
label
:blocked
do
.alert.alert-error
=
f
.
check_box
:blocked
-
if
@admin_user
.
blocked
%span
Blocked
%span
=
link_to
'Unblock'
,
unblock_admin_user_path
(
@admin_user
),
:method
=>
:put
,
:class
=>
"btn small"
This user is blocked and is not able to login GitLab
-
else
%span
=
link_to
'Block'
,
block_admin_user_path
(
@admin_user
),
:confirm
=>
'USER WILL BE BLOCKED! Are you sure?'
,
:method
=>
:put
,
:class
=>
"btn small danger"
Blocked user will removed from all projects
&
will not be able to login to GitLab.
.actions
.actions
=
f
.
submit
'Save'
,
:class
=>
"btn primary"
=
f
.
submit
'Save'
,
:class
=>
"btn primary"
-
if
@admin_user
.
new_record?
-
if
@admin_user
.
new_record?
...
...
app/views/admin/users/index.html.haml
View file @
c9def945
...
@@ -2,15 +2,29 @@
...
@@ -2,15 +2,29 @@
Users
Users
=
link_to
'New User'
,
new_admin_user_path
,
:class
=>
"btn small right"
=
link_to
'New User'
,
new_admin_user_path
,
:class
=>
"btn small right"
%br
%br
%table
.zebra-striped.table-bordered
%ul
.nav.nav-pills
%li
{
:class
=>
"#{'active' unless params[:filter]}"
}
=
link_to
"Active"
,
admin_users_path
%li
{
:class
=>
"#{'active' if params[:filter] == "
admins
"}"
}
=
link_to
admin_users_path
(
:filter
=>
"admins"
)
do
Admins
%li
{
:class
=>
"#{'active' if params[:filter] == "
blocked
"}"
}
=
link_to
admin_users_path
(
:filter
=>
"blocked"
)
do
Blocked
%li
{
:class
=>
"#{'active' if params[:filter] == "
wop
"}"
}
=
link_to
admin_users_path
(
:filter
=>
"wop"
)
do
Without projects
%table
.admin-table
%thead
%thead
%th
Admin
%th
Admin
%th
Name
%th
Name
%th
Email
%th
Email
%th
Projects
%th
Projects
%th
Edit
%th
Blocked
%th
Blocked
%th
%th
%th
-
@admin_users
.
each
do
|
user
|
-
@admin_users
.
each
do
|
user
|
%tr
%tr
...
@@ -18,8 +32,12 @@
...
@@ -18,8 +32,12 @@
%td
=
link_to
user
.
name
,
[
:admin
,
user
]
%td
=
link_to
user
.
name
,
[
:admin
,
user
]
%td
=
user
.
email
%td
=
user
.
email
%td
=
user
.
users_projects
.
count
%td
=
user
.
users_projects
.
count
%td
=
check_box_tag
"blocked"
,
1
,
user
.
blocked
,
:disabled
=>
:disabled
%td
=
link_to
'Edit'
,
edit_admin_user_path
(
user
),
:id
=>
"edit_
#{
dom_id
(
user
)
}
"
,
:class
=>
"btn small"
%td
=
link_to
'Edit'
,
edit_admin_user_path
(
user
),
:id
=>
"edit_
#{
dom_id
(
user
)
}
"
,
:class
=>
"btn small"
%td
=
link_to
'Destroy'
,
[
:admin
,
user
],
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"btn small danger"
%td
-
if
user
.
blocked
=
link_to
'Unblock'
,
unblock_admin_user_path
(
user
),
:method
=>
:put
,
:class
=>
"btn small success"
-
else
=
link_to
'Block'
,
block_admin_user_path
(
user
),
:confirm
=>
'USER WILL BE BLOCKED! Are you sure?'
,
:method
=>
:put
,
:class
=>
"btn small danger"
%td
=
link_to
'Destroy'
,
[
:admin
,
user
],
:confirm
=>
'USER WILL BE REMOVED! Are you sure?'
,
:method
=>
:delete
,
:class
=>
"btn small danger"
=
paginate
@admin_users
,
:theme
=>
"admin"
=
paginate
@admin_users
,
:theme
=>
"admin"
app/views/admin/users/show.html.haml
View file @
c9def945
%h3
%h3
=
@admin_user
.
name
=
@admin_user
.
name
-
if
@admin_user
.
blocked
%small
Blocked
-
if
@admin_user
.
admin
%small
Administrator
=
link_to
'Edit'
,
edit_admin_user_path
(
@admin_user
),
:class
=>
"btn small right"
=
link_to
'Edit'
,
edit_admin_user_path
(
@admin_user
),
:class
=>
"btn small right"
%
h
r
%
b
r
%table
.zebra-striped
%table
.zebra-striped
.table-bordered
%tr
%tr
%td
%td
%b
%b
...
@@ -49,15 +53,37 @@
...
@@ -49,15 +53,37 @@
%td
%td
=
@admin_user
.
twitter
=
@admin_user
.
twitter
%h3
Projects
%hr
%table
.zebra-striped
%br
%h3
Add User to Projects
%br
=
form_tag
team_update_admin_user_path
(
@admin_user
),
:class
=>
"bulk_import"
,
:method
=>
:put
do
%table
.table-bordered
%thead
%tr
%th
Projects
%th
Project Access:
%tr
%td
=
select_tag
:project_ids
,
options_from_collection_for_select
(
@projects
,
:id
,
:name
),
:multiple
=>
true
%td
=
select_tag
:project_access
,
options_for_select
(
Project
.
access_options
),
:class
=>
"project-access-select"
%tr
%td
=
submit_tag
'Add'
,
:class
=>
"btn primary"
%td
Read more about project permissions
%strong
=
link_to
"here"
,
help_permissions_path
,
:class
=>
"vlink"
%br
-
if
@admin_user
.
projects
.
present?
%h3
Projects
%br
%table
.zebra-striped.table-bordered
%tr
%tr
%thead
%thead
%th
Name
%th
Name
%th
Project Access
%th
Project Access
%th
Repository Access
%th
%th
%th
%th
...
@@ -69,22 +95,6 @@
...
@@ -69,22 +95,6 @@
%td
=
link_to
'Edit Access'
,
edit_admin_team_member_path
(
tm
),
:class
=>
"btn small"
%td
=
link_to
'Edit Access'
,
edit_admin_team_member_path
(
tm
),
:class
=>
"btn small"
%td
=
link_to
'Remove from team'
,
admin_team_member_path
(
tm
),
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"btn small danger"
%td
=
link_to
'Remove from team'
,
admin_team_member_path
(
tm
),
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"btn small danger"
=
form_tag
team_update_admin_user_path
(
@admin_user
),
:class
=>
"bulk_import"
,
:method
=>
:put
do
%table
%thead
%tr
%th
Projects
%th
Project Access:
%th
Repo Access:
%tr
%td
=
select_tag
:project_ids
,
options_from_collection_for_select
(
@projects
,
:id
,
:name
),
:multiple
=>
true
%td
=
select_tag
:project_access
,
options_for_select
(
Project
.
access_options
),
:class
=>
"project-access-select"
.actions
=
submit_tag
'Add'
,
:class
=>
"btn primary"
:css
:css
form
select
{
form
select
{
width
:
150px
;
width
:
150px
;
...
...
app/views/help/index.html.haml
View file @
c9def945
%h3
%h3
Gitlabhq
Gitlabhq
%span
.right
v2.
3
%span
.right
v2.
4
%hr
%hr
%h4
Self Hosted Git Management
%h4
Self Hosted Git Management
%h4
Fast, secure and stable solution based on Ruby on Rails
&
Gitolite.
%h4
Fast, secure and stable solution based on Ruby on Rails
&
Gitolite.
...
...
app/views/layouts/admin.html.haml
View file @
c9def945
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
.container
.container
%nav
.main_menu
%nav
.main_menu
=
render
"layouts/const_menu_links"
=
render
"layouts/const_menu_links"
=
link_to
"Users"
,
admin_users_path
,
:class
=>
controller
.
controller_name
==
"users"
?
"current"
:
nil
=
link_to
"Projects"
,
admin_projects_path
,
:class
=>
controller
.
controller_name
==
"projects"
?
"current"
:
nil
=
link_to
"Projects"
,
admin_projects_path
,
:class
=>
controller
.
controller_name
==
"projects"
?
"current"
:
nil
=
link_to
"Users"
,
admin_users_path
,
:class
=>
controller
.
controller_name
==
"users"
?
"current"
:
nil
=
link_to
"Emails"
,
admin_emails_path
,
:class
=>
controller
.
controller_name
==
"mailer"
?
"current"
:
nil
=
link_to
"Emails"
,
admin_emails_path
,
:class
=>
controller
.
controller_name
==
"mailer"
?
"current"
:
nil
=
link_to
"Resque"
,
"/info/resque"
=
link_to
"Resque"
,
"/info/resque"
...
...
config/routes.rb
View file @
c9def945
...
@@ -14,6 +14,8 @@ Gitlab::Application.routes.draw do
...
@@ -14,6 +14,8 @@ Gitlab::Application.routes.draw do
resources
:users
do
resources
:users
do
member
do
member
do
put
:team_update
put
:team_update
put
:block
put
:unblock
end
end
end
end
resources
:projects
,
:constraints
=>
{
:id
=>
/[^\/]+/
}
do
resources
:projects
,
:constraints
=>
{
:id
=>
/[^\/]+/
}
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment