Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
8990d1de
Commit
8990d1de
authored
Jun 15, 2016
by
HERBERT Ryan
Browse files
Fixed a bug where creating a patient added the wrong permission to the user
parent
3adcb76a
Changes
2
Show whitespace changes
Inline
Side-by-side
server/web2py/applications/vidjil/controllers/patient.py
View file @
8990d1de
...
...
@@ -312,7 +312,7 @@ def add_form():
#patient creator automaticaly has all rights
#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)
patient_name
=
request
.
vars
[
"first_name"
]
+
' '
+
request
.
vars
[
"last_name"
]
...
...
server/web2py/applications/vidjil/controllers/run.py
View file @
8990d1de
...
...
@@ -222,9 +222,7 @@ def add_form():
admin_group
=
db
(
db
.
auth_group
.
role
==
'admin'
).
select
().
first
().
id
#patient creator automaticaly has all rights
auth
.
add_permission
(
user_group
,
'admin'
,
db
.
run
,
id
)
auth
.
add_permission
(
user_group
,
'read'
,
db
.
run
,
id
)
auth
.
add_permission
(
user_group
,
'anon'
,
db
.
run
,
id
)
auth
.
add_permission
(
user_group
,
'access'
,
db
.
run
,
id
)
res
=
{
"redirect"
:
"run/index"
,
"args"
:
{
"id"
:
id
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment