summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/ataxia_security.erl')
-rw-r--r--src/ataxia_security.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ataxia_security.erl b/src/ataxia_security.erl
index 27f0540..e51ab3c 100644
--- a/src/ataxia_security.erl
+++ b/src/ataxia_security.erl
@@ -14,7 +14,7 @@
-export([janitor/0, any/0, admin/0, user_from_id/1]).
--export([add_access/2, remove_access/2, allow_only/1]).
+-export([add_access/2, remove_access/2, allow_only/1, allow_any/0]).
-export([can_access/2]).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -36,6 +36,10 @@ remove_access (User, Permission) ->
allow_only (User) ->
ordsets:add_element(User, ordsets:new()).
+-spec allow_any () -> permission().
+allow_any () ->
+ ordsets:add_element(any(), ordsets:new()).
+
-spec user_from_id (any()) -> user().
user_from_id (ID) -> {user, ID}.