aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/cldb.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/cldb.erl b/server/cldb.erl
index 176576c..982aafc 100644
--- a/server/cldb.erl
+++ b/server/cldb.erl
@@ -1,7 +1,7 @@
% The clientdatabase
-module(cldb).
--export([init/0, ask/2, login/2, decVote/2, incVote/2, register/3]).
+-export([init/0, ask/2, login/2, decVote/2, incVote/2, register/3, check_rights/2]).
-record(user, {name, passwd, votes, rights}).
init() ->
@@ -47,4 +47,7 @@ incVote(User, Pwd) ->
end,
mnesia:transaction(F).
+check_rights(User, Name) ->
+ {_, _, Rights} = ask(User, Name),
+ Rights.