git://git.onelab.eu
/
myplc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c4cf31a
)
added SetRole() logic
author
Marc Fiuczynski
<mef@cs.princeton.edu>
Tue, 3 Nov 2009 20:05:23 +0000
(20:05 +0000)
committer
Marc Fiuczynski
<mef@cs.princeton.edu>
Tue, 3 Nov 2009 20:05:23 +0000
(20:05 +0000)
db-config
patch
|
blob
|
history
diff --git
a/db-config
b/db-config
index
1f429e7
..
a86ba61
100755
(executable)
--- a/
db-config
+++ b/
db-config
@@
-20,6
+20,17
@@
def SetMyPLCURL(url):
global g_url
g_url = url
global g_url
g_url = url
+# Get all currently registered roles
+g_role_names = [ role['name'] for role in GetRoles()]
+g_role_names.sort()
+
+def SetRole(role):
+ global g_role_names
+ if role['name'] not in g_role_names:
+ AddRole(role)
+ g_role_names.append(role['name'])
+ g_role_names.sort()
+
# Get list of existing tag types
g_known_tag_types = [tag_type['tagname'] for tag_type in GetTagTypes()]
g_known_tag_types.sort()
# Get list of existing tag types
g_known_tag_types = [tag_type['tagname'] for tag_type in GetTagTypes()]
g_known_tag_types.sort()