From 76256398ba61e47f71098b1aa6ea511473b93e44 Mon Sep 17 00:00:00 2001 From: nsensfel Date: Fri, 4 Jan 2019 19:07:34 +0100 Subject: ... --- src/ataxia_security.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ataxia_security.erl') 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}. -- cgit v1.2.3-70-g09d2