def __init__(self, trac_environment_key=None, env=None): """ :param trac_environment_key: We want to get rid of this eventually so use ``env`` kwargs instead. :param env: Trac environment which identifies the project """ if trac_environment_key is None and env is None: raise ValueError('Neither trac_environment_key or env given') if env is not None: trac_environment_key = _get_trac_environment_key(env) self._cache = GroupPermissionCache.instance() self._organizations = CQDEOrganizationStore.instance() self._ldapgroups = CQDELdapGroupStore.instance() self.trac_environment_key = trac_environment_key
def __init__(self, trac_environment_key=None, env=None): """ :param trac_environment_key: We want to get rid of this eventually so use ``env`` kwargs instead. :param env: Trac environment which identifies the project """ self.env = env if trac_environment_key is None and env is None: raise ValueError('Neither trac_environment_key or env given') if env is not None: trac_environment_key = _get_trac_environment_key(env) self._cache = GroupPermissionCache.instance() self._organizations = CQDEOrganizationStore.instance() self._ldapgroups = CQDELdapGroupStore.instance() self.trac_environment_key = trac_environment_key
def __init__(self): """ Initializes LDAP-connection """ # Read connection configuration info from conf self.connectPath = conf.ldap_connect_path # Admin rights are needed at least for creating users self.username = conf.ldap_bind_user self.password = conf.ldap_bind_password # Read other info from conf self._group_dn = conf.ldap_groups_dn self._group_cn = conf.ldap_groups_cn self._uid = conf.ldap_uid self._user_rdn = conf.ldap_user_rdn self._base_dn = conf.ldap_base_dn self._object_classes = conf.ldap_object_classes self._connection = None self.__cache = GroupPermissionCache.instance()
def __init__(self): if CQDELdapGroupStore._instance: raise SingletonExistsException("Use CQDELdapGroupStore.instance()") self.__cache = GroupPermissionCache.instance()
def setUp(self): self.cache = GroupPermissionCache.instance()