def group_perms_for_user(self, user, db_session=None): """ .. deprecated:: 0.8 :param user: :param db_session: :return: """ db_session = get_db_session(db_session, self) return ResourceService.group_perms_for_user( self, user=user, db_session=db_session)
def test_resources_with_direct_group_perms(self, db_session): self.set_up_user_group_and_perms(db_session) # test_perm1 from group perms should be ignored perms = ResourceService.group_perms_for_user(self.resource, self.user, db_session=db_session) second = [ PermissionTuple(self.user, "group_perm", "group", self.group, self.resource, False, True) ] check_one_in_other(perms, second)
def test_resources_with_direct_group_perms(self, db_session): self.set_up_user_group_and_perms(db_session) # test_perm1 from group perms should be ignored perms = ResourceService.group_perms_for_user( self.resource, self.user, db_session=db_session ) second = [ PermissionTuple( self.user, "group_perm", "group", self.group, self.resource, False, True ) ] check_one_in_other(perms, second)