Exemple #1
0
 def setDefault(self):
     ProvisionerConfig.setDefault(self)
     self.profileAttr = None
     self.profilesAcl = {}
     self.profileGroupMapping = False
     self.profileGroupPrefix = ""
     self.profilesEntity = {}
Exemple #2
0
 def readConf(self):
     ProvisionerConfig.readConf(self)
     if self.has_option(self.section, 'profile_attr'):
         self.profileAttr = self.get(self.section, 'profile_attr')
         PROFILEENTITY = 'profile_entity_'
         for option in self.options(self.section):
             if option.startswith(PROFILEENTITY):
                 self.profilesEntity[option.replace(PROFILEENTITY, '').lower()] = self.get(self.section, option)
Exemple #3
0
 def readConf(self):
     ProvisionerConfig.readConf(self)
     if self.has_option(self.section, 'profile_attr'):
         self.profileAttr = self.get(self.section, 'profile_attr')
         PROFILEENTITY = 'profile_entity_'
         for option in self.options(self.section):
             if option.startswith(PROFILEENTITY):
                 self.profilesEntity[option.replace(PROFILEENTITY, '').lower()] = self.get(self.section, option)
Exemple #4
0
 def readConf(self):
     PROFILEACL = "profile_acl_"
     ProvisionerConfig.readConf(self)
     try:
         self.doauth = self.getboolean(self.section, "doauth")
     except:
         pass
     for option in self.options(self.section):
         if option.startswith(PROFILEACL):
             self.profilesAcl[option.replace(PROFILEACL, "")] = self.get(self.section, option)
     self.profilesOrder = self.get(self.section, "profiles_order").split()
Exemple #5
0
 def readConf(self):
     PROFILEACL = "profile_acl_"
     ProvisionerConfig.readConf(self)
     try:
         self.doauth = self.getboolean(self.section, "doauth")
     except:
         pass
     for option in self.options(self.section):
         if option.startswith(PROFILEACL):
             self.profilesAcl[option.replace(PROFILEACL, "")] = self.get(
                 self.section, option)
     self.profilesOrder = self.get(self.section, "profiles_order").split()
Exemple #6
0
 def readConf(self):
     ProvisionerConfig.readConf(self)
     for attr in ["uid", "givenName", "sn"]:
         option = "ldap_" + attr
         self.__dict__[option] = self.get(self.section, option)
     if self.has_option(self.section, "profile_attr"):
         self.profileAttr = self.get(self.section, "profile_attr")
         if self.has_option(self.section, "profile_group_mapping"):
             self.profileGroupMapping = self.getboolean(self.section, "profile_group_mapping")
         if self.has_option(self.section, "profile_group_prefix"):
             self.profileGroupPrefix = self.get(self.section, "profile_group_prefix")
         PROFILEACL = "profile_acl_"
         for option in self.options(self.section):
             if option.startswith(PROFILEACL):
                 self.profilesAcl[option.replace(PROFILEACL, "").lower()] = self.get(self.section, option)
Exemple #7
0
 def readConf(self):
     PROFILEACL = "profile_acl_"
     ProvisionerConfig.readConf(self)
     try:
         self.doauth = self.getboolean(self.section, "doauth")
     except:
         pass
     for option in self.options(self.section):
         if option.startswith(PROFILEACL):
             value = self.get(self.section, option)
             if isfile(value):
                 acls = open(value, 'r').read().split('\n')
                 # Clean empty lines, and join them by :
                 value = ':' + (':'.join([x for x in acls if x.strip() and x[0] != '#']))
             else:
                 self.profilesAcl[option.replace(PROFILEACL, "")] = value
     self.profilesOrder = self.get(self.section, "profiles_order").split()
Exemple #8
0
 def readConf(self):
     PROFILEACL = "profile_acl_"
     ProvisionerConfig.readConf(self)
     try:
         self.doauth = self.getboolean(self.section, "doauth")
     except:
         pass
     for option in self.options(self.section):
         if option.startswith(PROFILEACL):
             value = self.get(self.section, option)
             if isfile(value):
                 acls = open(value, 'r').read().split('\n')
                 # Clean empty lines, and join them by :
                 value = ':' + (':'.join(
                     [x for x in acls if x.strip() and x[0] != '#']))
             else:
                 self.profilesAcl[option.replace(PROFILEACL, "")] = value
     self.profilesOrder = self.get(self.section, "profiles_order").split()
Exemple #9
0
 def readConf(self):
     ProvisionerConfig.readConf(self)
     for attr in ["uid", "givenName", "sn"]:
         option = "ldap_" + attr
         self.__dict__[option] = self.get(self.section, option)
     if self.has_option(self.section, "profile_attr"):
         self.profileAttr = self.get(self.section, "profile_attr")
         if self.has_option(self.section, "profile_group_mapping"):
             self.profileGroupMapping = self.getboolean(
                 self.section, "profile_group_mapping")
         if self.has_option(self.section, "profile_group_prefix"):
             self.profileGroupPrefix = self.get(self.section,
                                                "profile_group_prefix")
         PROFILEACL = "profile_acl_"
         for option in self.options(self.section):
             if option.startswith(PROFILEACL):
                 self.profilesAcl[option.replace(PROFILEACL,
                                                 "").lower()] = self.get(
                                                     self.section, option)
Exemple #10
0
 def setDefault(self):
     ProvisionerConfig.setDefault(self)
     self.profileAttr = None
     self.profilesEntity = {}
Exemple #11
0
 def setDefault(self):
     ProvisionerConfig.setDefault(self)
     self.profileAttr = None
     self.profilesEntity = {}
Exemple #12
0
 def setDefault(self):
     ProvisionerConfig.setDefault(self)
     self.doauth = True
     self.profilesAcl = {}
     self.profilesOrder = []
Exemple #13
0
 def setDefault(self):
     ProvisionerConfig.setDefault(self)
     self.doauth = True
     self.profilesAcl = {}
     self.profilesOrder = []