summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-01-10 18:48:54 +0100
committernsensfel <SpamShield0@noot-noot.org>2019-01-10 18:48:54 +0100
commit7f162e8824f3977dc5cc207dd5257ad0b39faa97 (patch)
treeb51ce99282f37cb86587b8268c3fb98a355e33c1 /src/ataxia_security.erl
parent2dc910eab6e0c4cc415ed85f4cb85b66c2077ac5 (diff)
Allows the use of locks when creating entries.
Diffstat (limited to 'src/ataxia_security.erl')
-rw-r--r--src/ataxia_security.erl14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ataxia_security.erl b/src/ataxia_security.erl
index b1ec662..4088cd4 100644
--- a/src/ataxia_security.erl
+++ b/src/ataxia_security.erl
@@ -14,7 +14,16 @@
-export([janitor/0, any/0, admin/0, user_from_id/1]).
--export([add_access/2, remove_access/2, allow_only/1, allow_any/0]).
+-export
+(
+ [
+ add_access/2,
+ remove_access/2,
+ allow_only/1,
+ allow_any/0,
+ allow_none/0
+ ]
+).
-export([can_access/2]).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -40,6 +49,9 @@ allow_only (User) ->
allow_any () ->
ordsets:add_element(any(), ordsets:new()).
+-spec allow_none () -> permission().
+allow_none () -> ordsets:new().
+
-spec user_from_id (any()) -> user().
user_from_id (ID) -> {user, ID}.