summaryrefslogtreecommitdiffstats
path: root/lavalab-gen.py
diff options
context:
space:
mode:
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-xlavalab-gen.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py
index 64a4b0b..e5f5db0 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -120,7 +120,16 @@ def main(args):
ftok.write("TOKEN=" + token + "\n")
if user.has_key("password"):
password = user["password"]
- ftok.write("PASSWORD=" + password)
+ ftok.write("PASSWORD=" + password + "\n")
+ # libyaml convert yes/no to true/false...
+ if user.has_key("staff"):
+ value = user["staff"]
+ if value is True:
+ ftok.write("STAFF=1\n")
+ if user.has_key("superuser"):
+ value = user["superuser"]
+ if value is True:
+ ftok.write("SUPERUSER=1\n")
ftok.close()
if section_name == "callback_tokens":
for token in section: