Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ice #6

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Ice #6

wants to merge 3 commits into from

Conversation

codefree1024
Copy link
Collaborator

Hi Harry

I would put my changes for ice ldap sync here.

Cheers
Maryam

@github-actions
Copy link

github-actions bot commented Oct 27, 2022

Binder 👈 Launch a binder notebook on this branch for commit 8df4e81

I will automatically update this comment whenever this PR is modified

Binder 👈 Launch a binder notebook on this branch for commit 6241740

key = attributes[ldap_co_key][0]
attributes['is_maingroup'] = "1"
l = key.split(".")
if (len(l)== 2 and re.match("ice*", l[1]) ):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better to use a envrionment variable instead of hardcoding 'ice'

@@ -265,17 +299,27 @@ def get_groups(self):
members.append(m)

attributes['member'] = members
attributes['is_maingroup'] = "0"
l = key.split(".")
if (len(l)>= 3 and re.match("ice*", l[1]) and re.match("ice*", l[2]) ):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coded constant...

new_attributes={}
for a, v in attributes.items():
if a in ['displayName', 'mail']:
new_attributes["ice_" + a] = v
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here...

@@ -655,12 +765,15 @@ def destination(src, dst, target):
if isinstance(obsolete, GROUP) and len(obsolete.members) > 0:
raise Exception("Obsolete group still has members")

if obsolete.name in ['public', 'user1']:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aiiii, why specify 'user1' ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants