Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
7fe27d8947f3
Commit
927d0cc2
authored
Oct 08, 2012
by
Marin Jankovski
Browse files
Do not allow removal of a project owner user.
parent
3736cb9c9ea6
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/controllers/admin/users_controller.rb
View file @
7fe27d89
...
...
@@ -98,6 +98,7 @@ def update
def
destroy
@admin_user
=
User
.
find
(
params
[
:id
])
redirect_to
admin_users_url
,
notice:
'User is a project owner, cannot be removed.'
and
return
if
@admin_user
.
my_own_projects
.
count
>
0
@admin_user
.
destroy
respond_to
do
|
format
|
...
...
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