#1585 Api for user creation: base implementation
This commit is contained in:
parent
0187ae4e86
commit
825081174a
2 changed files with 30 additions and 0 deletions
|
@ -22,6 +22,10 @@ module Gitlab
|
|||
unauthorized! unless current_user
|
||||
end
|
||||
|
||||
def authenticated_as_admin!
|
||||
forbidden! unless current_user.is_admin?
|
||||
end
|
||||
|
||||
def authorize! action, subject
|
||||
unless abilities.allowed?(current_user, action, subject)
|
||||
forbidden!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue