1
0
Fork 0
mirror of https://github.com/kakwa/ldapcherry synced 2025-07-04 20:37:48 +02:00

adding loading roles and attributes

This commit is contained in:
kakwa 2015-05-18 20:04:47 +02:00
parent d6bb5c38ed
commit 2ba56128ac
2 changed files with 12 additions and 4 deletions

View file

@ -16,6 +16,8 @@ from operator import itemgetter
from socket import error as socket_error
from exceptions import *
from ldapcherry.roles import Roles
from ldapcherry.attributes import Attributes
#cherrypy http framework imports
import cherrypy
@ -165,6 +167,12 @@ class LdapCherry(object):
#auth = __import__(auth_module, globals(), locals(), ['Auth'], -1)
#self.auth = auth.Auth(config['auth'], cherrypy.log)
self.roles_file = self._get_param('roles', 'roles.file', config)
self.roles = Roles(self.roles_file)
self.attributes_file = self._get_param('attributes', 'attributes.file', config)
self.roles = Attributes(self.attributes_file)
except Exception as e:
self._handle_exception(e)
exit(1)