Commit d3af057a authored by Rémy Coutable's avatar Rémy Coutable

Use the same Rubocop config fro CE and EE

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 7a1a90f2
......@@ -479,7 +479,7 @@ Style/WordArray:
# branches, and conditions.
Metrics/AbcSize:
Enabled: true
Max: 64
Max: 60
# Avoid excessive block nesting.
Metrics/BlockNesting:
......@@ -494,7 +494,7 @@ Metrics/ClassLength:
# of test cases needed to validate a method.
Metrics/CyclomaticComplexity:
Enabled: true
Max: 18
Max: 17
# Limit lines to 80 characters.
Metrics/LineLength:
......@@ -727,9 +727,6 @@ Performance/TimesMap:
Rails:
Enabled: true
Rails/UniqBeforePluck:
Enabled: false
# Enforces consistent use of action filter methods.
Rails/ActionFilter:
Enabled: true
......
......@@ -222,7 +222,6 @@ Please view this file on the master branch, on stable branches it's out of date.
- Fix an issue with the "Commits" section of the cycle analytics summary. !6513
- Fix errors importing project feature and milestone models using GitLab project import
- Make JWT messages Docker-compatible
- Fix an issue with the "Commits" section of the cycle analytics summary. !6513
- Fix duplicate branch entry in the merge request version compare dropdown
- Respect the fork_project permission when forking projects
- Only update issuable labels if they have been changed
......
......@@ -217,14 +217,6 @@ class ProjectPolicy < BasePolicy
unless project.container_registry_enabled
cannot!(*named_abilities(:container_image))
end
# EE-only
if defined?(License) && License.block_changes?
cannot! :create_issue
cannot! :create_merge_request
cannot! :push_code
cannot! :push_code_to_protected_branches
end
end
def anonymous_rules
......@@ -271,4 +263,19 @@ class ProjectPolicy < BasePolicy
:"admin_#{name}"
]
end
# EE-specific
module EeDisabledFeaturePermissions
def disabled_features!
super
if License.block_changes?
cannot! :create_issue
cannot! :create_merge_request
cannot! :push_code
cannot! :push_code_to_protected_branches
end
end
end
prepend EeDisabledFeaturePermissions
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment