mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: respect moderator group permissions in guardian (#10713)
Since 9e4ed03, moderators can view groups with visibility level set to "Group owners, members and moderators". This fixes an issue where moderators can see the group in /g but then get a 404 when clicking on individual groups.
This commit is contained in:
@ -845,7 +845,7 @@ describe GroupsController do
|
||||
end
|
||||
|
||||
it 'should not be able to update a group it cannot see' do
|
||||
group.update!(visibility_level: 2)
|
||||
group.update!(visibility_level: Group.visibility_levels[:owners])
|
||||
|
||||
put "/groups/#{group.id}.json", params: { group: { name: 'testing' } }
|
||||
|
||||
|
Reference in New Issue
Block a user