[sysadmin-bin] create-auth: remember who is a sysadmin



commit 385a6c3dc40d1369151cd7728b439365e18eb359
Author: Olav Vitters <olav vitters nl>
Date:   Sat Apr 2 15:34:11 2011 +0200

    create-auth: remember who is a sysadmin

 create-auth |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/create-auth b/create-auth
index 25e8614..b0951dc 100755
--- a/create-auth
+++ b/create-auth
@@ -181,14 +181,22 @@ def build_user_hash(group_list, restrict=None):
     user_data = lookup_user_info(users | gnomevcs_users)
 
     for uid in gnomevcs_users:
-        if uid in user_data:
-            if restrict == 'gnomegit-i18n':
-                if uid == 'translations':
-                    user_data[uid]['restrict'] = 'gnomegit-i18n'
-                else:
-                    user_data[uid]['restrict'] = 'gnomegit'
+        if uid not in user_data:
+            continue
+
+        if restrict == 'gnomegit-i18n':
+            if uid == 'translations':
+                user_data[uid]['restrict'] = 'gnomegit-i18n'
             else:
-                user_data[uid]['restrict'] = restrict
+                user_data[uid]['restrict'] = 'gnomegit'
+        else:
+            user_data[uid]['restrict'] = restrict
+
+    for uid in wheel | sysadmin:
+        if uid not in user_data:
+            continue
+
+        user_data[uid]['sysadmin'] = True
 
     return user_data
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]