Define a default for rights['public'] in views/models/base.py. Alter rights
in views/models/site.py to allow anyone, even signed-out users, to view the
site home page.
Patch by: Todd Larsen
--- a/app/soc/views/models/base.py Sat Nov 22 10:06:03 2008 +0000
+++ b/app/soc/views/models/base.py Sat Nov 22 10:29:13 2008 +0000
@@ -90,6 +90,7 @@
rights = {}
rights['unspecified'] = []
rights['any_access'] = [access.checkIsUser]
+ rights['public'] = [access.checkIsUser]
rights['create'] = [access.checkIsDeveloper]
rights['edit'] = [access.checkIsDeveloper]
rights['delete'] = [access.checkIsDeveloper]
--- a/app/soc/views/models/site.py Sat Nov 22 10:06:03 2008 +0000
+++ b/app/soc/views/models/site.py Sat Nov 22 10:29:13 2008 +0000
@@ -31,6 +31,7 @@
from soc.logic import dicts
from soc.logic import validate
from soc.views import helper
+from soc.views.helper import access
from soc.views.helper import widgets
from soc.views.models import presence
@@ -102,6 +103,9 @@
}
params['delete_redirect'] = '/' + params['url_name'] + '/list'
+ params['rights'] = {
+ 'any_access': [access.allow],
+ 'public': [access.allow]}
params = dicts.merge(original_params, params)