Skip to content
Snippets Groups Projects
Commit a5085e62 authored by Rajendra Kadam's avatar Rajendra Kadam
Browse files

Update custom emoji policy

parent 8498210c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -9,7 +9,7 @@ class CustomEmojiPolicy < BasePolicy
enable :delete_custom_emoji
end
 
rule { author & can?(:developer_access) }.policy do
rule { author & can?(:create_custom_emoji) }.policy do
enable :delete_custom_emoji
end
end
Loading
Loading
@@ -89,6 +89,7 @@ class GroupPolicy < BasePolicy
rule { guest }.policy do
enable :read_group
enable :upload_file
enable :guest_access
end
 
rule { admin }.policy do
Loading
Loading
@@ -178,6 +179,7 @@ class GroupPolicy < BasePolicy
enable :update_default_branch_protection
enable :create_deploy_token
enable :destroy_deploy_token
enable :owner_access
end
 
rule { can?(:read_nested_project_resources) }.policy do
Loading
Loading
Loading
Loading
@@ -58,6 +58,16 @@
expect_allowed(*custom_emoji_permissions)
end
end
context 'is emoji creator but not a member of the group' do
before do
custom_emoji.update_attribute(:creator, user)
end
it do
expect_disallowed(*custom_emoji_permissions)
end
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment