Always check if a user filled in a user profile
Also, if there is no checks defined, still do the general
checks.
--- a/app/soc/views/models/base.py Sat Oct 25 22:28:31 2008 +0000
+++ b/app/soc/views/models/base.py Sun Oct 26 00:13:26 2008 +0000
@@ -80,7 +80,7 @@
"""
new_rights = {}
- new_rights['any_access'] = [access.checkIsLoggedIn]
+ new_rights['any_access'] = [access.checkIsUser]
self._rights = dicts.merge(rights, new_rights)
self._params = params
@@ -385,15 +385,15 @@
the response provided by the failed access check.
"""
+ # Call each access checker
+ for check in self._rights['any_access']:
+ check(request)
+
if access_type not in self._rights:
# No checks defined, so do the 'generic check' and bail out
self.checkUnspecified(access_type, request)
return
- # Call each access checker
- for check in self._rights['any_access']:
- check(request)
-
for check in self._rights[access_type]:
check(request)