Fixed checking permissions for other than current user