diff options
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 4f189f35196..fdde6d5de6c 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -64,6 +64,10 @@ module API end end + def authorize_admin_project + authorize! :admin_project, user_project + end + def can?(object, action, subject) abilities.allowed?(object, action, subject) end |