update all teams code. refactoring and some corrections
This commit is contained in:
parent
7658f8c151
commit
18bd1c9d30
35 changed files with 332 additions and 283 deletions
|
@ -94,6 +94,14 @@ class ApplicationController < ActionController::Base
|
|||
return access_denied! unless can?(current_user, :download_code, project)
|
||||
end
|
||||
|
||||
def authorize_manage_user_team!
|
||||
return access_denied! unless user_team.present? && can?(current_user, :manage_user_team, user_team)
|
||||
end
|
||||
|
||||
def authorize_admin_user_team!
|
||||
return access_denied! unless user_team.present? && can?(current_user, :admin_user_team, user_team)
|
||||
end
|
||||
|
||||
def access_denied!
|
||||
render "errors/access_denied", layout: "errors", status: 404
|
||||
end
|
||||
|
@ -135,4 +143,5 @@ class ApplicationController < ActionController::Base
|
|||
def dev_tools
|
||||
Rack::MiniProfiler.authorize_request
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue