summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2018-12-13 19:09:49 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2018-12-13 19:09:49 +0100 |
commit | 3ffb430c28ba3c04835d2762a17aac39a1e64ded (patch) | |
tree | e0200629f57ad717cb247a2cae71d266217848a7 /src/shared | |
parent | da06d32b135b3bc29cedd15ed8630a0eef0c2ab3 (diff) |
...
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/struct/shr_db_user.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shared/struct/shr_db_user.erl b/src/shared/struct/shr_db_user.erl index 8368024..dcd8685 100644 --- a/src/shared/struct/shr_db_user.erl +++ b/src/shared/struct/shr_db_user.erl @@ -15,7 +15,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -export_type([user/0, permission/0]). --export([can_access/2]). +-export([can_access/2, player/1]). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -24,6 +24,9 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +-spec player (shr_player:id()) -> db_user(). +player (ID) -> {user, ID}. + -spec can_access (permission(), user()) -> boolean(). can_access (_, admin) -> true; can_access (any, _) -> true; |