Thinkofix in access.checkIsInvited
authorSverre Rabbelier <srabbelier@gmail.com>
Sun, 07 Dec 2008 20:02:40 +0000
changeset 713 bcd480745f44
parent 712 b9e4cc00f30a
child 714 3e2ce3d8057a
Thinkofix in access.checkIsInvited Patch by: Sverre Rabbelier
app/soc/views/helper/access.py
--- a/app/soc/views/helper/access.py	Sun Dec 07 20:02:17 2008 +0000
+++ b/app/soc/views/helper/access.py	Sun Dec 07 20:02:40 2008 +0000
@@ -285,14 +285,15 @@
       'role': 'a host for this program'}
 
   splitpath = request.path.split('/')
+  splitpath = splitpath[1:] # cut off leading ''
 
   if len(splitpath) < 4:
     # TODO: perhaps this needs a better explanation?
     deny(request)
 
-  role = splitpath[1]
-  group_id = splitpath[3]
-  user_id = splitpath[4]
+  role = splitpath[0]
+  group_id = splitpath[2]
+  user_id = splitpath[3]
 
   user = user_logic.logic.getForFields(
       {'account': users.get_current_user()}, unique=True)