diff options
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r-- | app/models/ability.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb index 6103a2947e2..f70268d3138 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -61,6 +61,7 @@ class Ability :read_merge_request, :read_note, :read_commit_status, + :read_container_image, :download_code ] @@ -203,6 +204,7 @@ class Ability :admin_label, :read_commit_status, :read_build, + :read_container_image, ] end @@ -216,7 +218,9 @@ class Ability :update_build, :create_merge_request, :create_wiki, - :push_code + :push_code, + :create_container_image, + :update_container_image, ] end @@ -242,7 +246,8 @@ class Ability :admin_wiki, :admin_project, :admin_commit_status, - :admin_build + :admin_build, + :admin_container_image, ] end @@ -287,6 +292,10 @@ class Ability rules += named_abilities('build') end + unless project.container_registry_enabled + rules += named_abilities('container_image') + end + rules end |