18691: Rephrase expression.
authorTom Clegg <tom@curii.com>
Tue, 15 Mar 2022 14:21:40 +0000 (10:21 -0400)
committerTom Clegg <tom@curii.com>
Tue, 15 Mar 2022 14:43:25 +0000 (10:43 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

services/api/app/models/arvados_model.rb

index 6deab8952f74be2163b045f0241bf6d3e2fb6198..c71996a3728a60cb6bcef417b4a3998c0d98c2d4 100644 (file)
@@ -249,9 +249,9 @@ class ArvadosModel < ApplicationRecord
     # Return [] if this is a frozen project and the current user can't
     # unfreeze
     return [] if respond_to?(:frozen_by_uuid) && frozen_by_uuid &&
-                 !(Rails.configuration.API.UnfreezeProjectRequiresAdmin ?
-                     current_user.andand.is_admin :
-                     current_user.can?(manage: uuid))
+                 (Rails.configuration.API.UnfreezeProjectRequiresAdmin ?
+                    !current_user.andand.is_admin :
+                    !current_user.can?(manage: uuid))
     # Return [] if nobody can write because this object is inside a
     # frozen project
     return [] if FrozenGroup.where(uuid: owner_uuid).any?