コード例 #1
0
ファイル: memberdata.py プロジェクト: pigaov10/plone4.3
 def canPasswordSet(self):
     """True iff user can change password."""
     # IUserManagement provides doChangeUser
     plugins = self._getPlugins()
     managers = plugins.listPlugins(IUserManagement)
     for mid, manager in managers:
         if IPasswordSetCapability.providedBy(manager) and manager.allowPasswordSet(self.getId()):
             return True
     return False
コード例 #2
0
 def canPasswordSet(self):
     """True iff user can change password."""
     # IUserManagement provides doChangeUser
     plugins = self._getPlugins()
     managers = plugins.listPlugins(IUserManagement)
     for mid, manager in managers:
         if (IPasswordSetCapability.providedBy(manager) and
                 manager.allowPasswordSet(self.getId())):
             return True
     return False
コード例 #3
0
    def testLDAPImplements(self):
        klass = PloneLDAPMultiPlugin

        self.assertTrue(IAuthenticationPlugin.implementedBy(klass))
        self.assertTrue(ICredentialsResetPlugin.implementedBy(klass))
        self.assertTrue(IDeleteCapability.implementedBy(klass))
        self.assertTrue(IGroupCapability.implementedBy(klass))
        self.assertTrue(IGroupEnumerationPlugin.implementedBy(klass))
        self.assertTrue(IGroupIntrospection.implementedBy(klass))
        self.assertTrue(IGroupManagement.implementedBy(klass))
        self.assertTrue(IGroupsPlugin.implementedBy(klass))
        self.assertTrue(IMutablePropertiesPlugin.implementedBy(klass))
        self.assertTrue(IPasswordSetCapability.implementedBy(klass))
        self.assertTrue(IPropertiesPlugin.implementedBy(klass))
        self.assertTrue(IRoleEnumerationPlugin.implementedBy(klass))
        self.assertTrue(IRolesPlugin.implementedBy(klass))
        self.assertTrue(IUserAdderPlugin.implementedBy(klass))
        self.assertTrue(IUserEnumerationPlugin.implementedBy(klass))
        self.assertTrue(IUserManagement.implementedBy(klass))
コード例 #4
0
ファイル: testInterfaces.py プロジェクト: Vinsurya/Plone
    def testLDAPImplements(self):
        klass = PloneLDAPMultiPlugin

        self.assertTrue(IAuthenticationPlugin.implementedBy(klass))
        self.assertTrue(ICredentialsResetPlugin.implementedBy(klass))
        self.assertTrue(IDeleteCapability.implementedBy(klass))
        self.assertTrue(IGroupCapability.implementedBy(klass))
        self.assertTrue(IGroupEnumerationPlugin.implementedBy(klass))
        self.assertTrue(IGroupIntrospection.implementedBy(klass))
        self.assertTrue(IGroupManagement.implementedBy(klass))
        self.assertTrue(IGroupsPlugin.implementedBy(klass))
        self.assertTrue(IMutablePropertiesPlugin.implementedBy(klass))
        self.assertTrue(IPasswordSetCapability.implementedBy(klass))
        self.assertTrue(IPropertiesPlugin.implementedBy(klass))
        self.assertTrue(IRoleEnumerationPlugin.implementedBy(klass))
        self.assertTrue(IRolesPlugin.implementedBy(klass))
        self.assertTrue(IUserAdderPlugin.implementedBy(klass))
        self.assertTrue(IUserEnumerationPlugin.implementedBy(klass))
        self.assertTrue(IUserManagement.implementedBy(klass))
コード例 #5
0
 def _testPasswordSetCapability(self, klass):
     if IPasswordSetCapability.implementedBy(klass):
         self.assertTrue(hasattr(klass, 'allowPasswordSet'))
コード例 #6
0
 def testAllowChangePassword(self):
     self.failUnless(
         IPasswordSetCapability.providedBy(self.portal.acl_users.pmm))
コード例 #7
0
ファイル: testInterfaces.py プロジェクト: Vinsurya/Plone
 def _testPasswordSetCapability(self, klass):
     if IPasswordSetCapability.implementedBy(klass):
         self.assertTrue(hasattr(klass, 'allowPasswordSet'))