Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
94ed78fc
Commit
94ed78fc
authored
Nov 30, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a wrongly named migration and namespace an EE-specific policy
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
1da19431
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
app/policies/ee/project_policy.rb
app/policies/ee/project_policy.rb
+16
-0
app/policies/project_policy.rb
app/policies/project_policy.rb
+2
-15
db/migrate/20161021185735_migrate_ee_sidekiq_queues_from_default.rb
.../20161021185735_migrate_ee_sidekiq_queues_from_default.rb
+1
-1
No files found.
app/policies/ee/project_policy.rb
0 → 100644
View file @
94ed78fc
module
EE
module
ProjectPolicy
def
disabled_features!
raise
NotImplementedError
unless
defined?
(
super
)
super
if
License
.
block_changes?
cannot!
:create_issue
cannot!
:create_merge_request
cannot!
:push_code
cannot!
:push_code_to_protected_branches
end
end
end
end
app/policies/project_policy.rb
View file @
94ed78fc
class
ProjectPolicy
<
BasePolicy
prepend
EE
::
ProjectPolicy
def
rules
team_access!
(
user
)
...
...
@@ -267,19 +269,4 @@ 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
db/migrate/20161021185735_migrate_ee_sidekiq_queues_from_default.rb
View file @
94ed78fc
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
MigrateE
e
SidekiqQueuesFromDefault
<
ActiveRecord
::
Migration
class
MigrateE
E
SidekiqQueuesFromDefault
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment