Commit 8990d1de authored by HERBERT Ryan's avatar HERBERT Ryan
Browse files

Fixed a bug where creating a patient added the wrong permission to the user

parent 3adcb76a
...@@ -312,7 +312,7 @@ def add_form(): ...@@ -312,7 +312,7 @@ def add_form():
#patient creator automaticaly has all rights #patient creator automaticaly has all rights
#auth.add_permission(user_group, 'admin', db.patient, id) #auth.add_permission(user_group, 'admin', db.patient, id)
auth.add_permission(user_group, 'read', db.patient, id) auth.add_permission(user_group, 'access', db.patient, id)
#auth.add_permission(user_group, 'anon', db.patient, id) #auth.add_permission(user_group, 'anon', db.patient, id)
patient_name = request.vars["first_name"] + ' ' + request.vars["last_name"] patient_name = request.vars["first_name"] + ' ' + request.vars["last_name"]
......
...@@ -222,9 +222,7 @@ def add_form(): ...@@ -222,9 +222,7 @@ def add_form():
admin_group = db(db.auth_group.role=='admin').select().first().id admin_group = db(db.auth_group.role=='admin').select().first().id
#patient creator automaticaly has all rights #patient creator automaticaly has all rights
auth.add_permission(user_group, 'admin', db.run, id) auth.add_permission(user_group, 'access', db.run, id)
auth.add_permission(user_group, 'read', db.run, id)
auth.add_permission(user_group, 'anon', db.run, id)
res = {"redirect": "run/index", res = {"redirect": "run/index",
"args" : { "id" : id }, "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