Commit cc30d0b0 authored by marcus.hardt's avatar marcus.hardt

Merge branch 'improve-primary-group-handling' into 'master'

Improve primary group handling

Closes #26

See merge request !31
parents 02520bce 24cf931d
......@@ -41,6 +41,15 @@ class User:
self.service_user = backend.User(
self.service_groups = [backend.Group(grp) for grp in]"/--------------------------------------------------------------------------------\\")"primary group: {UserInfo(data).primary_group}")"--------------------------------------------------------------------------------")"self.service_groups: ")
for group in self.service_groups:" {}")"\\--------------------------------------------------------------------------------/")
def assurance_verifier(self):
"""Produce a suitably function to check if a user is allowed.
......@@ -252,7 +261,7 @@ class User:
Create the groups on the service, if necessary.
for group in filter(lambda grp: not grp.exists(), self.service_groups):
for group in filter(lambda grp: not grp.exists(), [self.service_user.primary_group] + self.service_groups):"Creating group {}".format(
......@@ -198,6 +198,7 @@ class User:
if supplementary_groups is not None:
current_groups = [grp for grp in reg_info['secondaryGroups']]
new_groups = [grp.reg_info(short=True) for grp in supplementary_groups]
new_groups += [self.primary_group.reg_info()]
logger.debug("Groups according to BWIDM: {}".format([g['name'] for g in current_groups]))
logger.debug("Groups according to FEUDAL: {}".format([g['name'] for g in new_groups]))
......@@ -7,7 +7,7 @@ with open("", "r") as me:
author="Joshua Bachmeier",
description="LDF Adapter to connect BWIDM and FEUDAL",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment