Skip to content

Commit

Permalink
[Backport 3.3.x][Fixes #9332][Test Cases] A/W: owner should not have …
Browse files Browse the repository at this point in the history
…any modification permission on published resource (#9344)

* [Backport 3.3.x][Fixes #9332][Test Cases] A/W: owner should not have any modification permission on published resource

* [Backport 3.3.x][Fixes #9332][Test Cases] A/W: owner should not have any modification permission on published resource
  • Loading branch information
Alessio Fabiani authored May 16, 2022
1 parent 985888e commit 0aa6b19
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions geonode/security/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,6 @@ def test_permissions_are_set_as_expected_admin_upload_resource_publishing_True(s
{"users": {}, "groups": {}},
{
self.author: [
"delete_resourcebase",
"download_resourcebase",
"view_resourcebase",
],
Expand All @@ -2292,7 +2291,6 @@ def test_permissions_are_set_as_expected_admin_upload_resource_publishing_True(s
{"users": {}, "groups": {"second_custom_group": ["view_resourcebase"]}},
{
self.author: [
"delete_resourcebase",
"download_resourcebase",
"view_resourcebase",
],
Expand Down Expand Up @@ -2392,7 +2390,6 @@ def test_permissions_on_user_role_promotion_to_manager(self):
.first()
expected = {
self.author: [
"delete_resourcebase",
"download_resourcebase",
"view_resourcebase",
],
Expand Down Expand Up @@ -2449,7 +2446,6 @@ def test_permissions_on_user_role_demote_to_member(self):
self.assertEqual(sut.role, "member")
expected = {
self.author: [
"delete_resourcebase",
"download_resourcebase",
"view_resourcebase",
],
Expand Down Expand Up @@ -2674,7 +2670,7 @@ def assertions_for_approved_or_published_is_true(self):
resource_perm_specs = self.resource.get_all_level_info()
self.assertSetEqual(
set(resource_perm_specs['users'][self.author]),
set(self.owner_perms))
set(self.safe_perms))
self.assertSetEqual(
set(resource_perm_specs['users'][self.member_with_perms]),
set(self.owner_perms + self.layer_perms))
Expand Down

0 comments on commit 0aa6b19

Please sign in to comment.