1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-25 02:34:31 +01:00

implementing adding user to roles

This commit is contained in:
kakwa 2015-06-18 20:38:39 +02:00
parent f821aab9f4
commit 71c1eccc8e

View File

@ -421,6 +421,16 @@ class LdapCherry(object):
for b in badd: for b in badd:
self.backends[b].add_user(badd[b]) self.backends[b].add_user(badd[b])
roles = []
for r in self.roles.get_allroles():
if r in params:
roles.append(r)
key = self.attributes.get_key()
username = params[key]
groups = self.roles.get_groups(roles)
for b in groups:
self.backends[b].add_to_groups(username, groups[b])
@cherrypy.expose @cherrypy.expose
def logout(self): def logout(self):
""" logout page """ logout page