Skip to content

Ice#6

Open
codefree1024 wants to merge 3 commits into
mainfrom
ice
Open

Ice#6
codefree1024 wants to merge 3 commits into
mainfrom
ice

Conversation

@codefree1024

Copy link
Copy Markdown
Collaborator

Hi Harry

I would put my changes for ice ldap sync here.

Cheers
Maryam

@github-actions

github-actions Bot commented Oct 27, 2022

Copy link
Copy Markdown

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

Comment thread src/sync.py
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
Copy Markdown
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'

Comment thread src/sync.py
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
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hard-coded constant...

Comment thread src/sync.py
new_attributes={}
for a, v in attributes.items():
if a in ['displayName', 'mail']:
new_attributes["ice_" + a] = v

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

same here...

Comment thread src/sync.py
if isinstance(obsolete, GROUP) and len(obsolete.members) > 0:
raise Exception("Obsolete group still has members")

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

Copy link
Copy Markdown
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