summaryrefslogtreecommitdiffstats
path: root/src/web/template.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/template.vala
parent06c4d13da6267d9c5698bec9521c76e3efdb1efa (diff)
downloadserial-barcode-scanner-d2f7ccfd1bab830e7758b3af4a70dc31e64327f3.tar.bz2
web: more detailed authentication system
Diffstat (limited to 'src/web/template.vala')
-rw-r--r--src/web/template.vala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/web/template.vala b/src/web/template.vala
index 690de00..b5265d8 100644
--- a/src/web/template.vala
+++ b/src/web/template.vala
@@ -66,7 +66,8 @@ public class WebTemplate {
this.template = this.template.replace("{{{CONTENT}}}", ((string) template));
this.template = this.template.replace("{{{USERNAME}}}", login.name);
this.template = this.template.replace("{{{USERID}}}", "%d".printf(login.user));
- this.template = this.template.replace("{{{SUPERUSER}}}", login.superuser ? "" : "hidden");
+ this.template = this.template.replace("{{{AUTH_USERS}}}", (login.superuser || login.auth_users) ? "" : "hidden");
+ this.template = this.template.replace("{{{AUTH_CASHBOX}}}", (login.superuser || login.auth_cashbox) ? "" : "hidden");
}
public WebTemplate.DATA(string file) throws TemplateError {