[prev in list] [next in list] [prev in thread] [next in thread]
List: kupu-checkins
Subject: [kupu-checkins] r14618 - kupu/trunk/kupu/plone
From: duncan () codespeak ! net
Date: 2005-07-13 14:09:49
Message-ID: 20050713140949.435C327B5E () code1 ! codespeak ! net
[Download RAW message or body]
Author: duncan
Date: Wed Jul 13 16:09:48 2005
New Revision: 14618
Modified:
kupu/trunk/kupu/plone/plonelibrarytool.py
Log:
isKupuEnabled now returns False for the anonymous user (unless you pass \
allowAnonymous=True as a parameter). This means that hitting a Plone 2.1 site as an \
anonymous user won't send you a load of javascript you didn't want.
Modified: kupu/trunk/kupu/plone/plonelibrarytool.py
==============================================================================
--- kupu/trunk/kupu/plone/plonelibrarytool.py (original)
+++ kupu/trunk/kupu/plone/plonelibrarytool.py Wed Jul 13 16:09:48 2005
@@ -148,7 +148,7 @@
return getattr(self, 'install_beforeunload', True)
security.declareProtected('View', 'isKupuEnabled')
- def isKupuEnabled(self, useragent='', REQUEST=None):
+ def isKupuEnabled(self, useragent='', allowAnonymous=False, REQUEST=None):
def numerics(s):
'''Convert a string into a tuple of all digit sequences
'''
@@ -162,6 +162,9 @@
# First check whether the user actually wants kupu
pm = getToolByName(self, 'portal_membership')
+ if pm.isAnonymousUser() and not allowAnonymous:
+ return False
+
user = pm.getAuthenticatedMember()
if user.getProperty('wysiwyg_editor').lower() != 'kupu':
return False
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic