From 7f162e8824f3977dc5cc207dd5257ad0b39faa97 Mon Sep 17 00:00:00 2001 From: nsensfel Date: Thu, 10 Jan 2019 18:48:54 +0100 Subject: Allows the use of locks when creating entries. --- src/ataxia_security.erl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/ataxia_security.erl') 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}. -- cgit v1.2.3-70-g09d2