git://git.onelab.eu
/
unfold.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8d6e4e9
)
FIX: reject user deletes from django auth_user and manifold_db
author
Yasin Rahman
<loic.baron@lip6.fr>
Tue, 19 May 2015 09:43:08 +0000
(11:43 +0200)
committer
Yasin Rahman
<loic.baron@lip6.fr>
Tue, 19 May 2015 09:43:08 +0000
(11:43 +0200)
portal/actions.py
patch
|
blob
|
history
diff --git
a/portal/actions.py
b/portal/actions.py
index
7e231d2
..
b7ee9a0
100644
(file)
--- a/
portal/actions.py
+++ b/
portal/actions.py
@@
-445,7
+445,8
@@
def delete_local_user(wsgi_request, user_email):
user_config = json.loads(user[0]['config'])
authority_hrn = user_config.get('authority', None)
user_config = json.loads(user[0]['config'])
authority_hrn = user_config.get('authority', None)
- if is_pi(wsgi_request, '$user_hrn', authority_hrn):
+ #if is_pi(wsgi_request, '$user_hrn', authority_hrn):
+ try:
# removing from Django auth_user
UserModel = get_user_model()
UserModel._default_manager.filter(email__iexact = user_email).delete()
# removing from Django auth_user
UserModel = get_user_model()
UserModel._default_manager.filter(email__iexact = user_email).delete()
@@
-455,9
+456,9
@@
def delete_local_user(wsgi_request, user_email):
# removing manifold user
manifold_delete_user(wsgi_request, user_id)
# removing manifold user
manifold_delete_user(wsgi_request, user_id)
- e
ls
e:
- return False
-
#raise Exception,
"No sufficient rights on authority = ",authority_hrn
+ e
xcept Exception,
e:
+
#
return False
+
print
"No sufficient rights on authority = ",authority_hrn
return True
return True