feat: allow anonymous user access to demo archives

This commit is contained in:
2025-01-17 18:05:24 +01:00
parent 6dcf5acbae
commit 67f80133d4
4 changed files with 12 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ type user
type archive
relations
define view: [ user with period, group#member with period ] or owner or admin
define view: [ user with period, group#member with period, user:* ] or owner or admin
define execute: [ user with allocation, group#member with allocation ] or execute from parent or superuser from custodian
define owner: [ user ] or owner from parent
define admin: [ user ] or admin from custodian or superuser from custodian or admin from parent

10
scripts/adduser.sh Normal file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
IFS=',' read user group <<< "$1"
echo "user,$user,active,user,$user,,"
echo "user,$user,registered,user,$user,,"
echo "user,$user,member,group,$group,,"
echo "group,$group,parent,user,$user,,"

View File

@@ -3,7 +3,7 @@
#
sed -i -r '2,$s/([^,]+),([^,]+)/archive,\1,parent,archive,\2,,/' parent_archives.csv
sed -i -r '2,$s/([^,]+),([^,]+)/user,\1,owner,archive,\2,,/' archive_owners.csv
sed -i -r '2,$s/([^,]+),([^,]+)/group,\1#member,execute,archive,\2,quota,"{""tasks"": [ ""*"" ], quota"": ""-1.0"", ""start_time"": ""2025-01-01T00:00:00Z"", ""end_time"": ""2025-01-01T00:00:00Z""}"/' archive_group_execute_access.csv
sed -i -r '2,$s/([^,]+),([^,]+)/group,\1#member,execute,archive,\2,allocation,"{""tasks"": [ ""*"" ], ""quota"": ""-1.0"", ""start_time"": ""2025-01-01T00:00:00Z"", ""end_time"": ""2025-01-01T00:00:00Z""}"/' archive_group_execute_access.csv
sed -i -r '2,$s/([^,]+),([^,]+)/group,\1#member,view,archive,\2,period,"{""start_time"": ""2025-01-01T00:00:00Z"", ""end_time"": ""2025-01-01T00:00:00Z""}"/' archive_group_view_access.csv