BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
02cf9aa6
Commit
02cf9aa6
authored
Sep 26, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Group owner or admin can remove other group owners
parent
8674e1c2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
users_groups_controller.rb
app/controllers/users_groups_controller.rb
+1
-1
_users_group.html.haml
app/views/users_groups/_users_group.html.haml
+2
-2
No files found.
app/controllers/users_groups_controller.rb
View file @
02cf9aa6
...
...
@@ -19,7 +19,7 @@ class UsersGroupsController < ApplicationController
def
destroy
@users_group
=
@group
.
users_groups
.
find
(
params
[
:id
])
@users_group
.
destroy
unless
@users_group
.
user
==
@group
.
owner
@users_group
.
destroy
respond_to
do
|
format
|
format
.
html
{
redirect_to
members_group_path
(
@group
),
notice:
'User was successfully removed from group.'
}
...
...
app/views/users_groups/_users_group.html.haml
View file @
02cf9aa6
...
...
@@ -10,7 +10,7 @@
%span
.pull-right
%strong
=
member
.
human_access
-
if
show_controls
&&
user
!=
@group
.
owner
&&
user
!=
current_
user
-
if
show_controls
&&
can?
(
current_user
,
:manage_group
,
@group
)
&&
current_user
!=
user
=
link_to
'#'
,
class:
"btn-tiny btn js-toggle-button"
,
title:
'Edit access level'
do
%i
.icon-edit
=
link_to
group_users_group_path
(
@group
,
member
),
confirm:
remove_user_from_group_message
(
@group
,
user
),
method: :delete
,
remote:
true
,
class:
"btn-tiny btn btn-remove"
,
title:
'Remove user from group'
do
...
...
@@ -20,4 +20,4 @@
=
form_for
[
@group
,
member
],
remote:
true
do
|
f
|
.alert.prepend-top-20
=
f
.
select
:group_access
,
options_for_select
(
UsersGroup
.
group_access_roles
,
member
.
group_access
)
=
f
.
submit
'Save'
,
class:
'btn btn-save'
=
f
.
submit
'Save'
,
class:
'btn btn-save
btn-small
'
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