projects
/
matthijs
/
projects
/
xerxes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
483829f
)
* Fix error in import.py that caused everybody to be an admin.
author
Matthijs Kooijman
<matthijs@stdio.flexvps.nl>
Sat, 9 Feb 2008 00:54:57 +0000
(
01:54
+0100)
committer
Matthijs Kooijman
<matthijs@stdio.flexvps.nl>
Sat, 9 Feb 2008 00:54:57 +0000
(
01:54
+0100)
import.py
patch
|
blob
|
history
diff --git
a/import.py
b/import.py
index 1e77c90b10123c1a1ea767af95b954666eba0d27..26d0af133bb993cb64070d137590d486128478d2 100644
(file)
--- a/
import.py
+++ b/
import.py
@@
-31,6
+31,11
@@
for row in c.fetchall():
except User.DoesNotExist:
u = User(username=username)
+ if row[1]:
+ su = 1
+ else:
+ su = 0
+
c.execute("SELECT dyn_prop.name, dyn_prop_value.value"
" FROM dyn_prop_value, dyn_prop WHERE"
" dyn_prop_value.dynamicPropertyObjectId=%s AND"
@@
-40,10
+45,6
@@
for row in c.fetchall():
for row in c.fetchall():
props[row[0]] = row[1]
- if row[1]:
- su = 1
- else:
- su = 0
u.is_superuser = su
u.is_staff = su
names = props.get('Naam','').split(' ', 1)