1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/radicale_ynh.git synced 2024-09-03 20:16:14 +02:00
radicale_ynh/conf/rights

68 lines
1.9 KiB
Text
Raw Permalink Normal View History

2016-04-07 00:00:41 +02:00
# Rights are based on a regex-based file whose name is specified in the config (section "right", key "file").
#
# Authentication login is matched against the "user" key, and collection's path is matched against the "collection" key. You can use Python's ConfigParser interpolation values %(login)s and %(path)s. You can also get groups from the user regex in the collection with {0}, {1}, etc.
#
# For example, for the "user" key, ".+" means "authenticated user" and ".*" means "anybody" (including anonymous users).
#
# Section names are only used for naming the rule.
#
# Leading or ending slashes are trimmed from collection's path.
2016-04-12 14:56:23 +02:00
# User can read the root of all collection. And discovers your collection.
[user-read-root-collection]
2016-04-12 13:15:39 +02:00
user: .+
2016-04-12 14:56:23 +02:00
collection: ^/
2016-04-07 00:00:41 +02:00
permission: r
2016-04-12 14:56:23 +02:00
# Give read and write access to owners
[owner-read-write]
2016-04-12 13:15:39 +02:00
user: .+
2016-04-12 14:56:23 +02:00
collection: ^%(login)s|^%(login)s/.*
2016-04-07 00:00:41 +02:00
permission: rw
2016-04-12 13:15:39 +02:00
### EXAMPLES:
2016-04-12 14:56:23 +02:00
## Allow authenticated user to read all collections
# [allow-everyone-read]
# user: .+
# collection: .*
# permission: r
2016-04-12 13:15:39 +02:00
## This means all users starting with "admin" may read any collection
# [admin]
# user: ^admin.*$
# collection: .*
# permission: r
## A little more complex: give read access to users from a domain for all
2016-04-07 00:00:41 +02:00
# collections of all the users (ie. user@domain.tld can read domain/\*).
# [domain-wide-access]
# user: ^.+@(.+)\..+$
# collection: ^{0}/.+$
# permission: r
2016-04-12 13:15:39 +02:00
## This means all users may read and write any collection starting with public.
# [public]
# user: .*
# collection: ^public(/.+)?$
# permission: rw
2016-04-07 00:00:41 +02:00
2016-04-12 13:15:39 +02:00
## Partage public en lecture seule d'un agenda
# [public for readonly]
# user: .*
2016-04-12 14:56:23 +02:00
# collection: ^utilisateur/nom_calendrier.ics$
2016-04-12 13:15:39 +02:00
# permission: r
## Partage public en lecture/écriture d'un agenda
# [public for read/write]
# user: .*
2016-04-12 14:56:23 +02:00
# collection: ^utilisateur/nom_calendrier.ics$
2016-04-12 13:15:39 +02:00
# permission: rw
# [user1 can read and write user2/shared2]
# user: ^user1$
2016-04-12 14:56:23 +02:00
# collection: ^user2/shared2.ics$
2016-04-12 13:15:39 +02:00
# permission: rw