Author: rob
Date: 2007-11-03 04:33:31 -0400 (Sat, 03 Nov 2007)
New Revision: 10345
Modified:
opencore/trunk/opencore/auth/remote_auth.txt
opencore/trunk/opencore/auth/remoteauthplugin.py
opencore/trunk/opencore/configuration/profiles/default/properties.xml
opencore/trunk/opencore/configuration/profiles/default/propertiestool.xml
opencore/trunk/opencore/content/member.py
Log:
move remote_auth_sites property from the portal object to the
opencore_properties property sheet
Modified: opencore/trunk/opencore/auth/remote_auth.txt
===================================================================
--- opencore/trunk/opencore/auth/remote_auth.txt 2007-11-03 07:44:27 UTC
(rev 10344)
+++ opencore/trunk/opencore/auth/remote_auth.txt 2007-11-03 08:33:31 UTC
(rev 10345)
@@ -1,12 +1,11 @@
Test for Remote Auth
====================
-We start by setting up the Plone site's 'remote_auth_sites' property
-so it tries to do remote authentication (otherwise the plugin will
-just return).
+We start by setting up the 'remote_auth_sites' property so it tries to
+do remote authentication (otherwise the plugin will just return).
- >>> portal = self.portal
- >>> portal.manage_changeProperties(
+ >>> ocprops = self.portal.portal_properties.opencore_properties
+ >>> ocprops.manage_changeProperties(
... remote_auth_sites=
... ['http://localhost:8080/openplans'])
Modified: opencore/trunk/opencore/auth/remoteauthplugin.py
===================================================================
--- opencore/trunk/opencore/auth/remoteauthplugin.py 2007-11-03 07:44:27 UTC
(rev 10344)
+++ opencore/trunk/opencore/auth/remoteauthplugin.py 2007-11-03 08:33:31 UTC
(rev 10345)
@@ -43,7 +43,8 @@
Authenticates against a set of remote authentication providers.
Fires an event upon successful authentication. The URLs of the
remote auth providers are retrieved from a 'remote_auth_sites'
- property (of 'lines' type) on the Portal object.
+ property (of 'lines' type) on the opencore_properties property
+ sheet.
"""
meta_type = 'OpenCore Remote Authentication'
@@ -68,11 +69,12 @@
# we have to do this b/c PAS always invokes _every_ auth
# plug-in during the auth check
return
- portal = getToolByName(self, 'portal_url').getPortalObject()
- remote_auth_sites = portal.getProperty('remote_auth_sites')
+ ptool = getToolByName(self, 'portal_properties')
+ ocprops = ptool._getOb('opencore_properties')
+ remote_auth_sites = ocprops.getProperty('remote_auth_sites')
if not remote_auth_sites:
return
-
+
username = credentials.get('login')
password = credentials.get('password')
query = urlencode({'__ac_password': password})
Modified: opencore/trunk/opencore/configuration/profiles/default/properties.xml
===================================================================
--- opencore/trunk/opencore/configuration/profiles/default/properties.xml
2007-11-03 07:44:27 UTC (rev 10344)
+++ opencore/trunk/opencore/configuration/profiles/default/properties.xml
2007-11-03 08:33:31 UTC (rev 10345)
@@ -5,8 +5,6 @@
<property name="validate_email" type="boolean">False</property>
- <property name="remote_auth_sites" type="lines" />
-
<property name="title" type="string">OpenCore Site</property>
<property name="email_from_address"
Modified:
opencore/trunk/opencore/configuration/profiles/default/propertiestool.xml
===================================================================
--- opencore/trunk/opencore/configuration/profiles/default/propertiestool.xml
2007-11-03 07:44:27 UTC (rev 10344)
+++ opencore/trunk/opencore/configuration/profiles/default/propertiestool.xml
2007-11-03 08:33:31 UTC (rev 10345)
@@ -3,8 +3,7 @@
<object name="opencore_properties" meta_type="Plone Property Sheet">
- <property name="remote_auth_sites" type="lines">
- </property>
+ <property name="remote_auth_sites" type="lines"></property>
<property name="mailing_list_fqdn"
type="string">lists.openplans.org</property>
Modified: opencore/trunk/opencore/content/member.py
===================================================================
--- opencore/trunk/opencore/content/member.py 2007-11-03 07:44:27 UTC (rev
10344)
+++ opencore/trunk/opencore/content/member.py 2007-11-03 08:33:31 UTC (rev
10345)
@@ -291,8 +291,9 @@
Checks all of the servers in the remote_auth_sites property to
see if this specified id exists on any of those sites.
"""
- portal = getToolByName(self, 'portal_url').getPortalObject()
- remote_auth_sites = portal.getProperty('remote_auth_sites')
+ ptool = getToolByName(self, 'portal_properties')
+ ocprops = ptool._getOb('opencore_properties')
+ remote_auth_sites = ocprops.getProperty('remote_auth_sites')
if remote_auth_sites:
http = getUtility(IHTTPClient)
for url in remote_auth_sites:
--
Archive:
http://www.openplans.org/projects/opencore/lists/openplans-svn/archive/2007/11/1194078812562
To unsubscribe send an email with subject unsubscribe to [EMAIL PROTECTED]
Please contact [EMAIL PROTECTED] for questions.