diff options
author | Marco Ziener <mziener@lavabit.com> | 2010-10-14 16:14:18 +0200 |
---|---|---|
committer | Marco Ziener <mziener@lavabit.com> | 2010-10-14 16:14:18 +0200 |
commit | bde55a9f9456b7ab38b8ae35a3dc65cf4044aabe (patch) | |
tree | 6d2b1a59f6516e63a51013f4c9e1addabe5c8460 /server | |
parent | cfa125e96062c4ccabc155f68c36bc8bcf754b61 (diff) | |
download | erlang-bde55a9f9456b7ab38b8ae35a3dc65cf4044aabe.tar.gz erlang-bde55a9f9456b7ab38b8ae35a3dc65cf4044aabe.tar.xz erlang-bde55a9f9456b7ab38b8ae35a3dc65cf4044aabe.zip |
Rights Check
Diffstat (limited to 'server')
-rw-r--r-- | server/cldb.erl | 5 |
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. |