def check_unlock
if state_was == Locked and state == Queued
if self.locked_by_uuid != current_api_client_authorization.uuid
- raise InvalidStateTransitionError.new("locked by a different token")
+ raise ArvadosModel::PermissionDeniedError.new("locked by a different token")
end
if self.lock_count >= Rails.configuration.Containers.MaxDispatchAttempts
self.state = Cancelled
current_user.andand.is_admin
end
+ def permission_to_destroy
+ current_user.andand.is_admin
+ end
+
def ensure_owner_uuid_is_permitted
# validate_change ensures owner_uuid can't be changed at all --
# except during create, which requires admin privileges. Checking