diff options
author | drew cimino <dcimino@gitlab.com> | 2019-04-11 18:21:18 +0300 |
---|---|---|
committer | drew cimino <dcimino@gitlab.com> | 2019-06-05 04:25:26 +0300 |
commit | 42d6d3187fb7305daead326bfdf56a09c249f829 (patch) | |
tree | 5522fd8f7894f2913d27b691f1662e85b38aaa7f /app/policies/base_policy.rb | |
parent | ebc18b45c7e72b28c1981446c95433611903868d (diff) |
preventing blocked users and their PipelineSchdules from creating new Pipelines
updated several specs and factories to accomodate new permissions
Diffstat (limited to 'app/policies/base_policy.rb')
-rw-r--r-- | app/policies/base_policy.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/policies/base_policy.rb b/app/policies/base_policy.rb index 5dd2279ef99..82bf9bf8bf6 100644 --- a/app/policies/base_policy.rb +++ b/app/policies/base_policy.rb @@ -7,6 +7,10 @@ class BasePolicy < DeclarativePolicy::Base with_options scope: :user, score: 0 condition(:admin) { @user&.admin? } + desc "User is blocked" + with_options scope: :user, score: 0 + condition(:blocked) { @user&.blocked? } + desc "User has access to all private groups & projects" with_options scope: :user, score: 0 condition(:full_private_access) { @user&.full_private_access? } |