diff options
author | Hordur Freyr Yngvason <hfyngvason@gitlab.com> | 2019-07-04 13:31:44 +0300 |
---|---|---|
committer | Hordur Freyr Yngvason <hfyngvason@gitlab.com> | 2019-07-19 12:32:06 +0300 |
commit | 7b52cff4896c8f681aea34fb273209400cf3e06e (patch) | |
tree | 6e670b3da63422b09a40aaeaab56a6df3facd771 /app/policies | |
parent | 627d2b7fa440f4f9c6fd83f0cef8ab4ed705e9a5 (diff) |
Restrict slash commands to users who can log in
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/global_policy.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/policies/global_policy.rb b/app/policies/global_policy.rb index 134de1c9ace..311aab0dcd4 100644 --- a/app/policies/global_policy.rb +++ b/app/policies/global_policy.rb @@ -33,6 +33,7 @@ class GlobalPolicy < BasePolicy enable :access_git enable :receive_notifications enable :use_quick_actions + enable :use_slash_commands end rule { blocked | internal }.policy do @@ -40,6 +41,7 @@ class GlobalPolicy < BasePolicy prevent :access_api prevent :access_git prevent :receive_notifications + prevent :use_slash_commands end rule { required_terms_not_accepted }.policy do @@ -57,6 +59,7 @@ class GlobalPolicy < BasePolicy rule { access_locked }.policy do prevent :log_in + prevent :use_slash_commands end rule { ~(anonymous & restricted_public_level) }.policy do |