incorrectly takes into account indirect (i.e. inherited and global) permissions the accessor has on the accessed resource, which would not even get affected
should only require the grantor to have grant-privileges on the direct permissions that were requested or would get removed, and not require granting rights to any indirect permissions
The
setResourcePermissions()
method