Commit b161fe70 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'use-same-rubocop-config-for-ee' into 'master'

Use the same RuboCop config for CE and EE

See merge request !835
parents 666d44a2 d3af057a
...@@ -479,7 +479,7 @@ Style/WordArray: ...@@ -479,7 +479,7 @@ Style/WordArray:
# branches, and conditions. # branches, and conditions.
Metrics/AbcSize: Metrics/AbcSize:
Enabled: true Enabled: true
Max: 64 Max: 60
# Avoid excessive block nesting. # Avoid excessive block nesting.
Metrics/BlockNesting: Metrics/BlockNesting:
...@@ -494,7 +494,7 @@ Metrics/ClassLength: ...@@ -494,7 +494,7 @@ Metrics/ClassLength:
# of test cases needed to validate a method. # of test cases needed to validate a method.
Metrics/CyclomaticComplexity: Metrics/CyclomaticComplexity:
Enabled: true Enabled: true
Max: 18 Max: 17
# Limit lines to 80 characters. # Limit lines to 80 characters.
Metrics/LineLength: Metrics/LineLength:
...@@ -727,9 +727,6 @@ Performance/TimesMap: ...@@ -727,9 +727,6 @@ Performance/TimesMap:
Rails: Rails:
Enabled: true Enabled: true
Rails/UniqBeforePluck:
Enabled: false
# Enforces consistent use of action filter methods. # Enforces consistent use of action filter methods.
Rails/ActionFilter: Rails/ActionFilter:
Enabled: true Enabled: true
......
...@@ -264,7 +264,6 @@ Please view this file on the master branch, on stable branches it's out of date. ...@@ -264,7 +264,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 an issue with the "Commits" section of the cycle analytics summary. !6513
- Fix errors importing project feature and milestone models using GitLab project import - Fix errors importing project feature and milestone models using GitLab project import
- Make JWT messages Docker-compatible - 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 - Fix duplicate branch entry in the merge request version compare dropdown
- Respect the fork_project permission when forking projects - Respect the fork_project permission when forking projects
- Only update issuable labels if they have been changed - Only update issuable labels if they have been changed
......
...@@ -217,14 +217,6 @@ class ProjectPolicy < BasePolicy ...@@ -217,14 +217,6 @@ class ProjectPolicy < BasePolicy
unless project.container_registry_enabled unless project.container_registry_enabled
cannot!(*named_abilities(:container_image)) cannot!(*named_abilities(:container_image))
end 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 end
def anonymous_rules def anonymous_rules
...@@ -271,4 +263,19 @@ class ProjectPolicy < BasePolicy ...@@ -271,4 +263,19 @@ class ProjectPolicy < BasePolicy
:"admin_#{name}" :"admin_#{name}"
] ]
end 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 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