[ARVADOS] updated: 2.1.0-1975-g3725c5550
Git user
git at public.arvados.org
Thu Mar 3 18:31:15 UTC 2022
Summary of changes:
doc/api/methods/groups.html.textile.liquid | 11 +++++++++++
lib/config/export.go | 3 +++
sdk/go/arvados/group.go | 1 +
services/api/test/unit/group_test.rb | 16 +++++++++++++---
4 files changed, 28 insertions(+), 3 deletions(-)
via 3725c555044cdd0c137df387c1af5f1a17966227 (commit)
via d409f51a533cedd76a8cfe91357b13608bb9050b (commit)
via 8d623fb99bd24edaf1d70571179bfe6ecac7936a (commit)
via 11889bda63f5c4fff89ff54f92437178b22bacc8 (commit)
from f73b71e88b15214683a5483e76254a9795c8b915 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 3725c555044cdd0c137df387c1af5f1a17966227
Author: Tom Clegg <tom at curii.com>
Date: Thu Mar 3 13:30:37 2022 -0500
18691: Document groups.frozen_by_uuid attribute.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/doc/api/methods/groups.html.textile.liquid b/doc/api/methods/groups.html.textile.liquid
index e4b8594dd..6f5b4bbb8 100644
--- a/doc/api/methods/groups.html.textile.liquid
+++ b/doc/api/methods/groups.html.textile.liquid
@@ -34,6 +34,17 @@ table(table table-bordered table-condensed).
|trash_at|datetime|If @trash_at@ is non-null and in the past, this group and all objects directly or indirectly owned by the group will be hidden from API calls. May be untrashed.||
|delete_at|datetime|If @delete_at@ is non-null and in the past, the group and all objects directly or indirectly owned by the group may be permanently deleted.||
|is_trashed|datetime|True if @trash_at@ is in the past, false if not.||
+|frozen_by_uuid|string|For a frozen project, indicates the user who froze the project. Empty in all other cases. When a project is frozen, no further changes can be made to the project or its contents.||
+
+h3. Frozen projects
+
+A user with @manage@ permission can set the @frozen_by_uuid@ attribute of a @project@ group to their own user UUID. Once this is done, no further changes can be made to the project or its contents, including subprojects.
+
+The @frozen_by_uuid@ attribute can be cleared by an admin user. It can also be cleared by a user with @manage@ permission, unless the @API.UnfreezeProjectRequiresAdmin@ configuration setting is active.
+
+The optional @API.FreezeProjectRequiresDescription@ and @API.FreezeProjectRequiresProperties@ configuration settings can be used to prevent users from freezing projects that have empty @description@ and/or specified @properties@ entries.
+
+h3. Filter groups
@filter@ groups are virtual groups; they can not own other objects. Filter groups have a special @properties@ field named @filters@, which must be an array of filter conditions. See "list method filters":{{site.baseurl}}/api/methods.html#filters for details on the syntax of valid filters, but keep in mind that the attributes must include the object type (@collections@, @container_requests@, @groups@, @workflows@), separated with a dot from the field to be filtered on.
commit d409f51a533cedd76a8cfe91357b13608bb9050b
Author: Tom Clegg <tom at curii.com>
Date: Thu Mar 3 13:30:18 2022 -0500
18691: Export new frozen-project configs.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/lib/config/export.go b/lib/config/export.go
index 4e903a8b3..db413b97b 100644
--- a/lib/config/export.go
+++ b/lib/config/export.go
@@ -62,6 +62,8 @@ var whitelist = map[string]bool{
"API": true,
"API.AsyncPermissionsUpdateInterval": false,
"API.DisabledAPIs": false,
+ "API.FreezeProjectRequiresDescription": true,
+ "API.FreezeProjectRequiresProperties": true,
"API.KeepServiceRequestTimeout": false,
"API.MaxConcurrentRequests": false,
"API.MaxIndexDatabaseRead": false,
@@ -72,6 +74,7 @@ var whitelist = map[string]bool{
"API.MaxTokenLifetime": false,
"API.RequestTimeout": true,
"API.SendTimeout": true,
+ "API.UnfreezeProjectRequiresAdmin": true,
"API.VocabularyPath": false,
"API.WebsocketClientEventQueue": false,
"API.WebsocketServerEventQueue": false,
commit 8d623fb99bd24edaf1d70571179bfe6ecac7936a
Author: Tom Clegg <tom at curii.com>
Date: Thu Mar 3 13:09:57 2022 -0500
18691: Add frozen_by_uuid field to Go SDK.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/sdk/go/arvados/group.go b/sdk/go/arvados/group.go
index d5243dc17..ad7ac1ee2 100644
--- a/sdk/go/arvados/group.go
+++ b/sdk/go/arvados/group.go
@@ -26,6 +26,7 @@ type Group struct {
Properties map[string]interface{} `json:"properties"`
WritableBy []string `json:"writable_by,omitempty"`
Description string `json:"description"`
+ FrozenByUUID string `json:"frozen_by_uuid"`
}
// GroupList is an arvados#groupList resource.
commit 11889bda63f5c4fff89ff54f92437178b22bacc8
Author: Tom Clegg <tom at curii.com>
Date: Thu Mar 3 13:09:34 2022 -0500
18691: Test moving items into/out of frozen project.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/services/api/test/unit/group_test.rb b/services/api/test/unit/group_test.rb
index ff079e1b5..bbb0f1957 100644
--- a/services/api/test/unit/group_test.rb
+++ b/services/api/test/unit/group_test.rb
@@ -404,19 +404,29 @@ update links set tail_uuid='#{g5}' where uuid='#{l1.uuid}'
cr.destroy
end
- # Once project is frozen, cannot change name/contents, trash, or
- # delete the project or anything beneath it
+ # Once project is frozen, cannot change name/contents, move,
+ # trash, or delete the project or anything beneath it
[proj, proj_inner, coll].each do |frozen|
assert_raises(StandardError, "should reject rename of #{frozen.uuid} with parent #{frozen.owner_uuid}") do
frozen.update_attributes!(name: 'foo2')
end
frozen.reload
+
if frozen.is_a?(Collection)
assert_raises(StandardError, "should reject manifest change of #{frozen.uuid}") do
frozen.update_attributes!(manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:foo\n")
end
- frozen.reload
+ else
+ assert_raises(StandardError, "should reject moving a project into #{frozen.uuid}") do
+ groups(:private).update_attributes!(owner_uuid: frozen.uuid)
+ end
+ end
+ frozen.reload
+
+ assert_raises(StandardError, "should reject moving #{frozen.uuid} to a different parent project") do
+ frozen.update_attributes!(owner_uuid: groups(:private).uuid)
end
+ frozen.reload
assert_raises(StandardError, "should reject setting trash_at of #{frozen.uuid}") do
frozen.update_attributes!(trash_at: db_current_time)
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list