to check user permissions for accessing a given object