mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-22 09:24:21 +01:00
adding loading roles and attributes
This commit is contained in:
parent
d6bb5c38ed
commit
2ba56128ac
@ -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)
|
||||
|
@ -57,12 +57,12 @@ tools.sessions.timeout = 10
|
||||
[attributes]
|
||||
|
||||
# file discribing form content
|
||||
attributes.file = '/etc/ldapcherry/attributes.yml'
|
||||
attributes.file = './tests/cfg/attributes.yml'
|
||||
|
||||
[roles]
|
||||
|
||||
# file listing roles
|
||||
roles.file = '/etc/ldapcherry/roles.yml'
|
||||
roles.file = './tests/cfg/roles.yml'
|
||||
|
||||
[backends]
|
||||
|
||||
@ -96,8 +96,8 @@ auth.mode = 'or'
|
||||
# resources parameters
|
||||
[resources]
|
||||
# templates directory
|
||||
templates.dir = '/usr/share/ldapcherry/templates/'
|
||||
templates.dir = './resources/templates/'
|
||||
|
||||
[/static]
|
||||
tools.staticdir.on = True
|
||||
tools.staticdir.dir = '/usr/share/ldapcherry/static/'
|
||||
tools.staticdir.dir = './resources/static/'
|
||||
|
Loading…
Reference in New Issue
Block a user