diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-13 13:26:31 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-13 13:26:31 +0000 |
commit | b7dfe2ae4054aa40e15182fd3c6cb7dd39f131db (patch) | |
tree | 5ab080ca9cadeb6cd9578bf301e4e9e8810bed9e /app/policies | |
parent | 25cb337cf12438169f1b14bc5dace8a06a7356e3 (diff) | |
download | gitlab-ce-b7dfe2ae4054aa40e15182fd3c6cb7dd39f131db.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/base_policy.rb | 2 | ||||
-rw-r--r-- | app/policies/ci/build_policy.rb | 2 | ||||
-rw-r--r-- | app/policies/concerns/policy_actor.rb | 2 | ||||
-rw-r--r-- | app/policies/environment_policy.rb | 2 | ||||
-rw-r--r-- | app/policies/global_policy.rb | 2 | ||||
-rw-r--r-- | app/policies/group_member_policy.rb | 2 | ||||
-rw-r--r-- | app/policies/group_policy.rb | 2 | ||||
-rw-r--r-- | app/policies/identity_provider_policy.rb | 2 | ||||
-rw-r--r-- | app/policies/issue_policy.rb | 2 | ||||
-rw-r--r-- | app/policies/merge_request_policy.rb | 2 | ||||
-rw-r--r-- | app/policies/namespace_policy.rb | 2 | ||||
-rw-r--r-- | app/policies/project_policy.rb | 2 | ||||
-rw-r--r-- | app/policies/project_snippet_policy.rb | 2 | ||||
-rw-r--r-- | app/policies/protected_branch_policy.rb | 2 |
14 files changed, 28 insertions, 0 deletions
diff --git a/app/policies/base_policy.rb b/app/policies/base_policy.rb index 82bf9bf8bf6..78379516062 100644 --- a/app/policies/base_policy.rb +++ b/app/policies/base_policy.rb @@ -36,3 +36,5 @@ class BasePolicy < DeclarativePolicy::Base rule { default }.enable :read_cross_project end + +BasePolicy.prepend_if_ee('EE::BasePolicy') diff --git a/app/policies/ci/build_policy.rb b/app/policies/ci/build_policy.rb index 0ca3e696f46..ebb99270b9a 100644 --- a/app/policies/ci/build_policy.rb +++ b/app/policies/ci/build_policy.rb @@ -44,3 +44,5 @@ module Ci rule { can?(:update_build) & terminal }.enable :create_build_terminal end end + +Ci::BuildPolicy.prepend_if_ee('EE::Ci::BuildPolicy') diff --git a/app/policies/concerns/policy_actor.rb b/app/policies/concerns/policy_actor.rb index 069d065280e..b963a64b429 100644 --- a/app/policies/concerns/policy_actor.rb +++ b/app/policies/concerns/policy_actor.rb @@ -34,3 +34,5 @@ module PolicyActor false end end + +PolicyActor.prepend_if_ee('EE::PolicyActor') diff --git a/app/policies/environment_policy.rb b/app/policies/environment_policy.rb index d1243491f5a..be512dd3b94 100644 --- a/app/policies/environment_policy.rb +++ b/app/policies/environment_policy.rb @@ -14,3 +14,5 @@ class EnvironmentPolicy < BasePolicy rule { stop_with_deployment_allowed | stop_with_update_allowed }.enable :stop_environment end + +EnvironmentPolicy.prepend_if_ee('EE::EnvironmentPolicy') diff --git a/app/policies/global_policy.rb b/app/policies/global_policy.rb index 311aab0dcd4..659fde574fc 100644 --- a/app/policies/global_policy.rb +++ b/app/policies/global_policy.rb @@ -75,3 +75,5 @@ class GlobalPolicy < BasePolicy enable :update_custom_attribute end end + +GlobalPolicy.prepend_if_ee('EE::GlobalPolicy') diff --git a/app/policies/group_member_policy.rb b/app/policies/group_member_policy.rb index 6f1afb87c85..f6e52def270 100644 --- a/app/policies/group_member_policy.rb +++ b/app/policies/group_member_policy.rb @@ -22,3 +22,5 @@ class GroupMemberPolicy < BasePolicy enable :destroy_group_member end end + +GroupMemberPolicy.prepend_if_ee('EE::GroupMemberPolicy') diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb index c726c7c24a7..f56ac0a5279 100644 --- a/app/policies/group_policy.rb +++ b/app/policies/group_policy.rb @@ -138,3 +138,5 @@ class GroupPolicy < BasePolicy @subject.max_member_access_for_user(@user) end end + +GroupPolicy.prepend_if_ee('EE::GroupPolicy') diff --git a/app/policies/identity_provider_policy.rb b/app/policies/identity_provider_policy.rb index d34cdd5bdd4..6d6dcaebff8 100644 --- a/app/policies/identity_provider_policy.rb +++ b/app/policies/identity_provider_policy.rb @@ -13,3 +13,5 @@ class IdentityProviderPolicy < BasePolicy rule { protected_provider }.prevent(:unlink) end + +IdentityProviderPolicy.prepend_if_ee('EE::IdentityProviderPolicy') diff --git a/app/policies/issue_policy.rb b/app/policies/issue_policy.rb index fa252af55e4..f86892227df 100644 --- a/app/policies/issue_policy.rb +++ b/app/policies/issue_policy.rb @@ -26,3 +26,5 @@ class IssuePolicy < IssuablePolicy prevent :reopen_issue end end + +IssuePolicy.prepend_if_ee('::EE::IssuePolicy') diff --git a/app/policies/merge_request_policy.rb b/app/policies/merge_request_policy.rb index 5ad7bdabdff..e2aca2a37d5 100644 --- a/app/policies/merge_request_policy.rb +++ b/app/policies/merge_request_policy.rb @@ -11,3 +11,5 @@ class MergeRequestPolicy < IssuablePolicy # note permissions are shared, and this would apply too broadly. rule { ~can?(:read_merge_request) }.prevent :create_note end + +MergeRequestPolicy.prepend_if_ee('EE::MergeRequestPolicy') diff --git a/app/policies/namespace_policy.rb b/app/policies/namespace_policy.rb index 937666c7e54..fd3bdddded6 100644 --- a/app/policies/namespace_policy.rb +++ b/app/policies/namespace_policy.rb @@ -16,3 +16,5 @@ class NamespacePolicy < BasePolicy rule { personal_project & ~can_create_personal_project }.prevent :create_projects end + +NamespacePolicy.prepend_if_ee('EE::NamespacePolicy') diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index 5c36b59f07b..e6f8d1052ed 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -519,3 +519,5 @@ class ProjectPolicy < BasePolicy @subject end end + +ProjectPolicy.prepend_if_ee('EE::ProjectPolicy') diff --git a/app/policies/project_snippet_policy.rb b/app/policies/project_snippet_policy.rb index e5e005cee6d..424558be1fe 100644 --- a/app/policies/project_snippet_policy.rb +++ b/app/policies/project_snippet_policy.rb @@ -46,3 +46,5 @@ class ProjectSnippetPolicy < BasePolicy rule { ~can?(:read_project_snippet) }.prevent :create_note end + +ProjectSnippetPolicy.prepend_if_ee('EE::ProjectSnippetPolicy') diff --git a/app/policies/protected_branch_policy.rb b/app/policies/protected_branch_policy.rb index 0e83d2e5834..1a5c6528b82 100644 --- a/app/policies/protected_branch_policy.rb +++ b/app/policies/protected_branch_policy.rb @@ -9,3 +9,5 @@ class ProtectedBranchPolicy < BasePolicy enable :destroy_protected_branch end end + +ProtectedBranchPolicy.prepend_if_ee('EE::ProtectedBranchPolicy') |