Changeset 2606 in products


Ignore:
Timestamp:
Jul 2, 2010 11:49:48 AM (14 years ago)
Author:
mylan
Message:

Fixed initial bugs in the package

Location:
quintagroup.gauth/trunk/quintagroup/gauth
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.gauth/trunk/quintagroup/gauth/browser/configure.zcml

    r2579 r2606  
    1414        /> 
    1515 
    16     <browser:page 
    17         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    <!--     /> --> 
    2323 
    24     <browser:page 
    25         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    <!--     /> --> 
    3131 
    3232    <browser:resource 
  • quintagroup.gauth/trunk/quintagroup/gauth/interfaces.py

    r2603 r2606  
    99 
    1010    password = Attribute("password", "Get GDocs portal account password.") 
     11     
  • quintagroup.gauth/trunk/quintagroup/gauth/utility.py

    r2604 r2606  
    88from plone.memoize.view import memoize_contextless 
    99 
    10 from quintagroiup.gauth.interfaces import IGAuthInterface 
    11 from quintagroup.gdata.browser.configlet import IGDataConfigletSchema 
     10from quintagroup.gauth.interfaces import IGAuthInterface 
     11from quintagroup.gauth.browser.configlet import IGAuthConfigletSchema 
    1212 
    1313logger = logging.getLogger('quintagroup.gauth') 
     
    2222    implements(IGAuthInterface) 
    2323 
    24     def __init__(self, context): 
    25         self.context = context 
     24    gconf = None 
    2625 
    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) 
    3229 
    3330    @property 
    3431    def email(self): 
    3532        """ Get the email.""" 
    36         return self.gdataconf.gdata_email 
     33        if not self.gconf: 
     34            return None 
     35        return self.gconf.gdata_email 
    3736 
    3837    @property 
    3938    def password(self): 
    4039        """ Get the password.""" 
    41         return self.gdataconf.gdata_pass 
     40        if not self.gconf: 
     41            return None 
     42        return self.gconf.gdata_pass 
    4243 
    4344 
Note: See TracChangeset for help on using the changeset viewer.