Changeset 2606 in products
- Timestamp:
- Jul 2, 2010 11:49:48 AM (14 years ago)
- Location:
- quintagroup.gauth/trunk/quintagroup/gauth
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.gauth/trunk/quintagroup/gauth/browser/configure.zcml
r2579 r2606 14 14 /> 15 15 16 < browser:page17 name="gauth-test"18 for="*"19 template="testview.pt"20 class=".testview.TestView"21 permission="zope2.Public"22 />16 <!-- <browser:page --> 17 <!-- name="gauth-test" --> 18 <!-- for="*" --> 19 <!-- template="testview.pt" --> 20 <!-- class=".testview.TestView" --> 21 <!-- permission="zope2.Public" --> 22 <!-- /> --> 23 23 24 < browser:page25 name="gauth-download"26 for="*"27 class=".testview.TestView"28 attribute="download"29 permission="zope2.Public"30 />24 <!-- <browser:page --> 25 <!-- name="gauth-download" --> 26 <!-- for="*" --> 27 <!-- class=".testview.TestView" --> 28 <!-- attribute="download" --> 29 <!-- permission="zope2.Public" --> 30 <!-- /> --> 31 31 32 32 <browser:resource -
quintagroup.gauth/trunk/quintagroup/gauth/interfaces.py
r2603 r2606 9 9 10 10 password = Attribute("password", "Get GDocs portal account password.") 11 -
quintagroup.gauth/trunk/quintagroup/gauth/utility.py
r2604 r2606 8 8 from plone.memoize.view import memoize_contextless 9 9 10 from quintagro iup.gauth.interfaces import IGAuthInterface11 from quintagroup.g data.browser.configlet import IGDataConfigletSchema10 from quintagroup.gauth.interfaces import IGAuthInterface 11 from quintagroup.gauth.browser.configlet import IGAuthConfigletSchema 12 12 13 13 logger = logging.getLogger('quintagroup.gauth') … … 22 22 implements(IGAuthInterface) 23 23 24 def __init__(self, context): 25 self.context = context 24 gconf = None 26 25 27 @property 28 @memoize_contextless 29 def gdataconf(self): 30 pps = queryMultiAdapter((self.context, self.context.REQUEST), name="plone_portal_state") 31 return queryAdapter(pps.portal(), IGDataConfigletSchema) 26 def gconf_init(self, context, request): 27 pps = queryMultiAdapter((context, request), name="plone_portal_state") 28 self.gconf = queryAdapter(pps.portal(), IGAuthConfigletSchema) 32 29 33 30 @property 34 31 def email(self): 35 32 """ Get the email.""" 36 return self.gdataconf.gdata_email 33 if not self.gconf: 34 return None 35 return self.gconf.gdata_email 37 36 38 37 @property 39 38 def password(self): 40 39 """ Get the password.""" 41 return self.gdataconf.gdata_pass 40 if not self.gconf: 41 return None 42 return self.gconf.gdata_pass 42 43 43 44
Note: See TracChangeset
for help on using the changeset viewer.