示例#1
0
 def setDefault(self):
     ProvisionerConfig.setDefault(self)
     self.profileAttr = None
     self.profilesAcl = {}
     self.profileGroupMapping = False
     self.profileGroupPrefix = ""
     self.profilesEntity = {}
示例#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)
示例#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)
示例#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()
示例#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()
示例#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)
示例#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()
示例#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()
示例#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)
示例#10
0
 def setDefault(self):
     ProvisionerConfig.setDefault(self)
     self.profileAttr = None
     self.profilesEntity = {}
示例#11
0
 def setDefault(self):
     ProvisionerConfig.setDefault(self)
     self.profileAttr = None
     self.profilesEntity = {}
示例#12
0
 def setDefault(self):
     ProvisionerConfig.setDefault(self)
     self.doauth = True
     self.profilesAcl = {}
     self.profilesOrder = []
示例#13
0
 def setDefault(self):
     ProvisionerConfig.setDefault(self)
     self.doauth = True
     self.profilesAcl = {}
     self.profilesOrder = []