Use available Rights Checker when rights are already defined.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Wed, 09 Sep 2009 21:00:51 +0200
changeset 2894 4af34d6e2a2d
parent 2893 1adc6a815c71
child 2895 cad75f6ba411
Use available Rights Checker when rights are already defined. Reviewed by: Lennard de Rijk
app/soc/views/helper/params.py
--- a/app/soc/views/helper/params.py	Wed Sep 09 20:15:53 2009 +0200
+++ b/app/soc/views/helper/params.py	Wed Sep 09 21:00:51 2009 +0200
@@ -18,6 +18,7 @@
 """
 
 __authors__ = [
+  '"Madhusudan.C.S" <madhusudancs@gmail.com>',
   '"Sverre Rabbelier" <sverre@rabbelier.nl>',
   ]
 
@@ -95,7 +96,11 @@
 
   logic = params['logic']
 
-  rights = access.Checker(params)
+  if params.get('rights'):
+    rights = params['rights']
+  else:
+    rights = access.Checker(params)
+
   rights['unspecified'] = []
   rights['any_access'] = ['checkIsLoggedIn']
   rights['show'] = ['checkIsUser']