@kba/anno-plugins
v0.0.8
Published
Plugins to augment anno-store*
Downloads
8
Readme
anno-rights
Rights management for anno store (users and rules)
ACL Users
role
: An optional global role of a userid
: The user ID such as their homepage or email addressperm
: An array of objects of collection-specific rolescollection
: The collection these roles apply torole
: The roles
ACL Rules
Rules for authorization are expressed as
sift-rule rules and read as JSON from the
environment variable ANNO_ACL_DATA
.
Rules are an ordered list of CONDITION
-RESULT
-DESCRIPTION
triplets:
CONDITION
is a sift query on an object encoding the request contextmethod
: One of the methods of anno-storeanno
: The existing annotationnewAnno
: The new annotation (in case ofcreate
,revise
)user
: The user calling the method, see ACL Userscollection
: ID of the collection in question. Defaults todefault
RESULT
istrue
to allow orfalse
to deny the requestDESCRIPTION
is an optional description of the rule