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