Fix mass-assignment. Dont allow users w/o access to create team
This commit is contained in:
parent
70e05801b1
commit
3ddd9f753c
3 changed files with 9 additions and 8 deletions
|
@ -94,6 +94,10 @@ class ApplicationController < ActionController::Base
|
|||
return access_denied! unless can?(current_user, :download_code, project)
|
||||
end
|
||||
|
||||
def authorize_create_team!
|
||||
return access_denied! unless can?(current_user, :create_team, nil)
|
||||
end
|
||||
|
||||
def authorize_manage_user_team!
|
||||
return access_denied! unless user_team.present? && can?(current_user, :manage_user_team, user_team)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue