Skip to content

Commit

Permalink
Fixed problem in mixin for testsuite (#108)
Browse files Browse the repository at this point in the history
When granting permissions on a specific object type and a specific object ID,
the ID must belong to an object of this type!
  • Loading branch information
crazyscientist authored Nov 24, 2022
1 parent 5ddf705 commit 759d8ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/tests/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _create_user_group_with_perm(self, dbsession: Session) -> typing.Tuple[User,
# Grant permission to parent group
self._grant_permission(dbsession, PermissionSchema(
recipient_type=RecipientType.GROUP, recipient_name=pgroup.name,
obj_type=PermissionTargetType.SCHEMA, obj_id=entity.id,
obj_type=PermissionTargetType.SCHEMA, obj_id=entity.schema_id,
permission=PermissionType.READ_ENTITY))

# Grant permission to group
Expand Down

0 comments on commit 759d8ca

Please sign in to comment.