--- a/app/soc/views/models/base.py Sun Dec 07 17:26:59 2008 +0000
+++ b/app/soc/views/models/base.py Sun Dec 07 19:01:35 2008 +0000
@@ -156,12 +156,8 @@
for field in fields:
empty_kwargs[field] = None
- if not kwargs:
- return self.edit(request, page_name=page_name, params=params,
- **empty_kwargs)
- else:
- return self.edit(request, page_name=page_name, params=params,
- seed=kwargs, **empty_kwargs)
+ return self.edit(request, page_name=page_name,
+ params=params, seed=kwargs, **empty_kwargs)
def edit(self, request, page_name=None, params=None, seed=None, **kwargs):
"""Displays the edit page for the entity specified by **kwargs.
--- a/app/soc/views/models/role.py Sun Dec 07 17:26:59 2008 +0000
+++ b/app/soc/views/models/role.py Sun Dec 07 19:01:35 2008 +0000
@@ -97,20 +97,19 @@
"""Displays the request promotion to Role page.
"""
- if not params:
- params = {}
new_params = {}
+
group_scope = kwargs['link_id']
- new_params['list_action'] = (redirects.getCreateRequestRedirect,
+ new_params['list_action'] = (redirects.getCreateRequestRedirect,
{'group_scope' : group_scope,
- 'url_name' : self._params['url_name'] })
+ 'url_name' : self._params['url_name']})
new_params['list_description'] = \
self.DEF_INVITE_INSTRUCTION_MSG_FMT % self._params
+ new_params['logic'] = user_logic.logic
- new_params = dicts.merge(new_params, params)
+ new_params = dicts.merge(params, new_params)
params = dicts.merge(new_params, user_view.view._params)
- params['logic'] = user_logic.logic
try:
access.checkAccess('invite', request, rights=params['rights'])
--- a/app/soc/views/models/site.py Sun Dec 07 17:26:59 2008 +0000
+++ b/app/soc/views/models/site.py Sun Dec 07 19:01:35 2008 +0000
@@ -69,8 +69,14 @@
params: a dict with params for this View
"""
+ rights = {}
+ rights['unspecified'] = [access.checkIsDeveloper]
+ rights['any_access'] = [access.allow]
+ rights['public'] = [access.allow]
+
new_params = {}
new_params['logic'] = soc.logic.models.site.logic
+ new_params['rights'] = rights
# TODO(alturin): add ugettext_lazy ?
new_params['name'] = "Site Settings"
@@ -88,12 +94,6 @@
new_params['public_template'] = 'soc/home/public.html'
- new_params['rights'] = {
- 'unspecified': [access.checkIsDeveloper],
- 'any_access': [access.allow],
- 'public': [access.allow]
- }
-
patterns = []
page_name = "Home Page"