X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1c4bf0f3bbc09808f4937dafa6c3023604b73dce..ad040e37430803ffa7db4f1856a4e362ad2cebfe:/services/api/app/models/group.rb diff --git a/services/api/app/models/group.rb b/services/api/app/models/group.rb index 09bb8af97d..5c0aeba589 100644 --- a/services/api/app/models/group.rb +++ b/services/api/app/models/group.rb @@ -49,6 +49,12 @@ class Group < ArvadosModel t.add :can_manage end + # check if admins are allowed to make changes to the project, e.g. it + # isn't trashed or frozen. + def admin_change_permitted + !(FrozenGroup.where(uuid: self.uuid).any? || TrashedGroup.where(group_uuid: self.uuid).any?) + end + protected def self.attributes_required_columns