Commit 44b27b51 authored by Alex Kalderimis's avatar Alex Kalderimis Committed by Robert Speicher

Add move_design ability

parent 92b3cee9
......@@ -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
......
......@@ -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
......
......@@ -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) }
......
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