361
361
// HasPermission returns true if the logged in user can perform <operation> on <target>.
363
363
return common.HasPermission(r.state.UserAccess, r.entity.Tag(), operation, target)
366
366
// UserHasPermission returns true if the passed in user can perform <operation> on <target>.
367
func (r *apiHandler) UserHasPermission(user names.UserTag, operation description.Access, target names.Tag) (bool, error) {
367
func (r *apiHandler) UserHasPermission(user names.UserTag, operation permission.Access, target names.Tag) (bool, error) {
368
368
return common.HasPermission(r.state.UserAccess, user, operation, target)