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
44b27b51
Commit
44b27b51
authored
Jul 24, 2020
by
Alex Kalderimis
Committed by
Robert Speicher
Jul 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add move_design ability
parent
92b3cee9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletion
+5
-1
app/policies/issue_policy.rb
app/policies/issue_policy.rb
+2
-0
app/policies/project_policy.rb
app/policies/project_policy.rb
+2
-0
spec/policies/design_management/design_policy_spec.rb
spec/policies/design_management/design_policy_spec.rb
+1
-1
No files found.
app/policies/issue_policy.rb
View file @
44b27b51
...
...
@@ -33,10 +33,12 @@ class IssuePolicy < IssuablePolicy
prevent
:read_design
prevent
:create_design
prevent
:destroy_design
prevent
:move_design
end
rule
{
locked
|
moved
}.
policy
do
prevent
:create_design
prevent
:move_design
prevent
:destroy_design
end
end
...
...
app/policies/project_policy.rb
View file @
44b27b51
...
...
@@ -342,6 +342,7 @@ class ProjectPolicy < BasePolicy
enable
:read_alert_management_alert
enable
:update_alert_management_alert
enable
:create_design
enable
:move_design
enable
:destroy_design
enable
:read_terraform_state
end
...
...
@@ -573,6 +574,7 @@ class ProjectPolicy < BasePolicy
prevent
:read_design_activity
prevent
:create_design
prevent
:destroy_design
prevent
:move_design
end
rule
{
read_package_registry_deploy_token
}.
policy
do
...
...
spec/policies/design_management/design_policy_spec.rb
View file @
44b27b51
...
...
@@ -5,7 +5,7 @@ RSpec.describe DesignManagement::DesignPolicy do
include
DesignManagementTestHelpers
let
(
:guest_design_abilities
)
{
%i[read_design]
}
let
(
:developer_design_abilities
)
{
%i[create_design destroy_design]
}
let
(
:developer_design_abilities
)
{
%i[create_design destroy_design
move_design
]
}
let
(
:design_abilities
)
{
guest_design_abilities
+
developer_design_abilities
}
let_it_be
(
:guest
)
{
create
(
:user
)
}
...
...
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