diff options
Diffstat (limited to 'app/policies/project_policy.rb')
-rw-r--r-- | app/policies/project_policy.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index 47d8d0eef3e..15f91cae86b 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -163,6 +163,9 @@ class ProjectPolicy < BasePolicy condition(:service_desk_enabled) { @subject.service_desk_enabled? } with_scope :subject + condition(:model_registry_enabled) { Feature.enabled?(:model_registry, @subject) } + + with_scope :subject condition(:resource_access_token_feature_available) do resource_access_token_feature_available? end @@ -892,6 +895,10 @@ class ProjectPolicy < BasePolicy enable :add_catalog_resource end + rule { model_registry_enabled }.policy do + enable :read_model_registry + end + private def user_is_user? |