Commit bb4faa7b authored by Marc Duez's avatar Marc Duez

server : admin rights => extend rights to the groups of patient's creator

parent 31292386
......@@ -64,9 +64,16 @@ def add_form():
user_group = auth.user_group(auth.user.id)
admin_group = db(db.auth_group.role=='admin').select().first().id
#patient creator automaticaly have all rights
auth.add_permission(user_group, 'admin', db.patient, id)
auth.add_permission(user_group, 'read', db.patient, id)
#tmp: share rights with users of the same group
for g in auth.user_groups :
auth.add_permission(g, 'admin', db.patient, id)
auth.add_permission(g, 'read', db.patient, id)
res = {"redirect": "patient/info",
"args" : { "id" : id },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment