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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
4eef1124
Commit
4eef1124
authored
Nov 19, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1906 from dosire/user_cannot_be_removed_if_project_owner
Cannot remove user that owns a project.
parents
c403c2a8
19e8473e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+3
-0
No files found.
app/controllers/admin/users_controller.rb
View file @
4eef1124
...
...
@@ -98,6 +98,9 @@ class Admin::UsersController < AdminController
def
destroy
@admin_user
=
User
.
find
(
params
[
:id
])
if
@admin_user
.
my_own_projects
.
count
>
0
redirect_to
admin_users_path
,
alert:
"User is a project owner and can't be removed."
and
return
end
@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