Only owner can remove project
This commit is contained in:
parent
6ea6ab7c8d
commit
cc0295b789
6 changed files with 13 additions and 5 deletions
|
@ -89,6 +89,8 @@ class ProjectsController < ProjectResourceController
|
|||
end
|
||||
|
||||
def destroy
|
||||
return access_denied! unless can?(current_user, :remove_project, project)
|
||||
|
||||
# Disable the UsersProject update_repository call, otherwise it will be
|
||||
# called once for every person removed from the project
|
||||
UsersProject.skip_callback(:destroy, :after, :update_repository)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue