summaryrefslogtreecommitdiffstats
path: root/src/web/websession.vala
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2015-02-14 22:53:22 +0100
committerSebastian Reichel <sre@ring0.de>2015-02-14 23:42:09 +0100
commitd2f7ccfd1bab830e7758b3af4a70dc31e64327f3 (patch)
tree5c56e8082df85ddcaf009c1d20782d306e385acc /src/web/websession.vala
parent06c4d13da6267d9c5698bec9521c76e3efdb1efa (diff)
downloadserial-barcode-scanner-d2f7ccfd1bab830e7758b3af4a70dc31e64327f3.tar.bz2
web: more detailed authentication system
Diffstat (limited to 'src/web/websession.vala')
-rw-r--r--src/web/websession.vala21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/web/websession.vala b/src/web/websession.vala
index 1dc6319..a3bf973 100644
--- a/src/web/websession.vala
+++ b/src/web/websession.vala
@@ -44,6 +44,21 @@ public class WebSession {
private set;
default = false;
}
+ public bool auth_cashbox {
+ get;
+ private set;
+ default = false;
+ }
+ public bool auth_products {
+ get;
+ private set;
+ default = false;
+ }
+ public bool auth_users {
+ get;
+ private set;
+ default = false;
+ }
public bool disabled {
get;
private set;
@@ -71,6 +86,9 @@ public class WebSession {
var auth = db.get_user_auth(user);
this.disabled = auth.disabled;
this.superuser = auth.superuser;
+ this.auth_cashbox = auth.auth_cashbox;
+ this.auth_products = auth.auth_products;
+ this.auth_users = auth.auth_users;
this.logged_in = true;
}
@@ -78,6 +96,9 @@ public class WebSession {
if(logged_in) {
db.set_sessionid(user, "");
superuser = false;
+ auth_cashbox = false;
+ auth_products = false;
+ auth_users = false;
logged_in = false;
}
}