Пример #1
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
Пример #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
    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
 def _testPasswordSetCapability(self, klass):
     if IPasswordSetCapability.implementedBy(klass):
         self.assertTrue(hasattr(klass, 'allowPasswordSet'))