projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
12626: Update permission graph after user merge.
[arvados.git]
/
services
/
api
/
app
/
models
/
group.rb
diff --git
a/services/api/app/models/group.rb
b/services/api/app/models/group.rb
index 0dd2a73576c00a32e6310307798e8acf9a4de0cf..fe183678c155855a19e6acd2fc4cf8089cd6749e 100644
(file)
--- a/
services/api/app/models/group.rb
+++ b/
services/api/app/models/group.rb
@@
-3,12
+3,15
@@
# SPDX-License-Identifier: AGPL-3.0
require 'can_be_an_owner'
# SPDX-License-Identifier: AGPL-3.0
require 'can_be_an_owner'
+require 'trashable'
class Group < ArvadosModel
include HasUuid
include KindAndEtag
include CommonApiTemplate
include CanBeAnOwner
class Group < ArvadosModel
include HasUuid
include KindAndEtag
include CommonApiTemplate
include CanBeAnOwner
+ include Trashable
+
after_create :invalidate_permissions_cache
after_update :maybe_invalidate_permissions_cache
before_create :assign_name
after_create :invalidate_permissions_cache
after_update :maybe_invalidate_permissions_cache
before_create :assign_name
@@
-18,10
+21,13
@@
class Group < ArvadosModel
t.add :group_class
t.add :description
t.add :writable_by
t.add :group_class
t.add :description
t.add :writable_by
+ t.add :delete_at
+ t.add :trash_at
+ t.add :is_trashed
end
def maybe_invalidate_permissions_cache
end
def maybe_invalidate_permissions_cache
- if uuid_changed? or owner_uuid_changed?
+ if uuid_changed? or owner_uuid_changed?
or is_trashed_changed?
# This can change users' permissions on other groups as well as
# this one.
invalidate_permissions_cache
# This can change users' permissions on other groups as well as
# this one.
invalidate_permissions_cache