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
Boxiang Sun
gitlab-ce
Commits
48019f1a
Commit
48019f1a
authored
Jun 18, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update admin area with new group memberships
parent
a0b6c964
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
23 deletions
+22
-23
app/controllers/admin/groups_controller.rb
app/controllers/admin/groups_controller.rb
+1
-3
app/controllers/users_controller.rb
app/controllers/users_controller.rb
+1
-1
app/views/admin/groups/show.html.haml
app/views/admin/groups/show.html.haml
+20
-19
No files found.
app/controllers/admin/groups_controller.rb
View file @
48019f1a
...
...
@@ -66,14 +66,12 @@ class Admin::GroupsController < Admin::ApplicationController
end
def
project_teams_update
@group
.
add_users
_to_project_teams
(
params
[
:user_ids
].
split
(
','
),
params
[
:project
_access
])
@group
.
add_users
(
params
[
:user_ids
].
split
(
','
),
params
[
:group
_access
])
redirect_to
[
:admin
,
@group
],
notice:
'Users were successfully added.'
end
def
destroy
@group
.
truncate_teams
@group
.
destroy
redirect_to
admin_groups_path
,
notice:
'Group was successfully deleted.'
...
...
app/controllers/users_controller.rb
View file @
48019f1a
...
...
@@ -3,7 +3,7 @@ class UsersController < ApplicationController
def
show
@user
=
User
.
find_by_username!
(
params
[
:username
])
@projects
=
@user
.
authorized_projects
.
where
(
'projects.id in (?)'
,
current_user
.
authorized_projects
.
map
(
&
:id
))
@projects
=
@user
.
authorized_projects
.
where
(
'projects.id in (?)'
,
current_user
.
authorized_projects
.
map
(
&
:id
))
.
order
(
'namespace_id DESC'
)
@events
=
@user
.
recent_events
.
where
(
project_id:
@projects
.
map
(
&
:id
)).
limit
(
20
)
@title
=
@user
.
name
...
...
app/views/admin/groups/show.html.haml
View file @
48019f1a
...
...
@@ -49,10 +49,23 @@
%strong
=
@group
.
created_at
.
stamp
(
"March 1, 1999"
)
.ui-box
%h5
.title
Projects
%small
(
#{
@group
.
projects
.
count
}
)
%ul
.well-list
-
@group
.
projects
.
sort_by
(
&
:name
).
each
do
|
project
|
%li
%strong
=
link_to
project
.
name_with_namespace
,
[
:admin
,
project
]
%span
.pull-right.light
%span
.monospace
=
project
.
path_with_namespace
+
".git"
.span6
.ui-box
%h5
.title
Add user to
Group projects
:
Add user to
the group
:
.ui-box-body.form-holder
%p
.light
Read more about project permissions
...
...
@@ -64,30 +77,18 @@
%div
.prepend-top-10
=
select_tag
:project_access
,
options_for_select
(
Project
.
access_options
),
{
class:
"project-access-select chosen span2"
}
%hr
=
submit_tag
'Add user to
projects in
group'
,
class:
"btn btn-create"
=
submit_tag
'Add user to
the
group'
,
class:
"btn btn-create"
.ui-box
%h5
.title
Users from
Group projects
Users from
#{
@group
.
name
}
Group
%small
(
#{
@group
.
users
.
count
}
)
(
#{
@group
.
users
_groups
.
count
}
)
%ul
.well-list
-
@group
.
users
.
sort_by
(
&
:name
).
each
do
|
user
|
-
@group
.
users_groups
.
order
(
'group_access DESC'
).
each
do
|
member
|
-
user
=
member
.
user
%li
{
class:
dom_class
(
user
)}
%strong
=
link_to
user
.
name
,
admin_user_path
(
user
)
%span
.pull-right.light
=
pluralize
user
.
authorized_projects
.
in_namespace
(
@group
).
count
,
'project'
=
member
.
human_access
.span6
.ui-box
%h5
.title
Projects
%small
(
#{
@group
.
projects
.
count
}
)
%ul
.well-list
-
@group
.
projects
.
sort_by
(
&
:name
).
each
do
|
project
|
%li
%strong
=
link_to
project
.
name_with_namespace
,
[
:admin
,
project
]
%span
.pull-right.light
%span
.monospace
=
project
.
path_with_namespace
+
".git"
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