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

feature: Active Directory user in nested groups #7175

Merged
merged 5 commits into from Aug 25, 2017

Conversation

Projects
None yet
6 participants
@MrDragon
Contributor

MrDragon commented Aug 17, 2017

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926

@mention-bot

This comment has been minimized.

Show comment
Hide comment
@mention-bot

mention-bot Aug 17, 2017

Thank you for submitting a PR @MrDragon! We have found the following @murrant, @jonathon-k and @ekoyle based on the history of these files to review this PR.

mention-bot commented Aug 17, 2017

Thank you for submitting a PR @MrDragon! We have found the following @murrant, @jonathon-k and @ekoyle based on the history of these files to review this PR.

@CLAassistant

This comment has been minimized.

Show comment
Hide comment
@CLAassistant

CLAassistant Aug 17, 2017

CLA assistant check
All committers have signed the CLA.

CLAassistant commented Aug 17, 2017

CLA assistant check
All committers have signed the CLA.

@murrant

Thanks for the PR!

Can you extract common code to a new function?

@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Aug 18, 2017

Member

I know the current code does not use it, but if you could switch to the Config class that would be great, but isn't required.

Soo, $config['auth_ad_groups'][$group]['level'] -> Config::get("auth_ad_groups.$group.level")

You can also specify a default value in the second argument to return when the variable is unset.

Member

murrant commented Aug 18, 2017

I know the current code does not use it, but if you could switch to the Config class that would be great, but isn't required.

Soo, $config['auth_ad_groups'][$group]['level'] -> Config::get("auth_ad_groups.$group.level")

You can also specify a default value in the second argument to return when the variable is unset.

@MrDragon

This comment has been minimized.

Show comment
Hide comment
@MrDragon

MrDragon Aug 21, 2017

Contributor

Ok, fixed issues (I hope), and changed that line to Config::get.
I didn't change other "$config" references, because, well, tbh, I don't know what I'm doing. Hadn't used classes before, haven't used 'git' before. I'm just an old-school procedural language, "patch -p0" kinda guy, good enough to mess with code until it does what I need it to do ;)

I appreciate your patience and input!

Contributor

MrDragon commented Aug 21, 2017

Ok, fixed issues (I hope), and changed that line to Config::get.
I didn't change other "$config" references, because, well, tbh, I don't know what I'm doing. Hadn't used classes before, haven't used 'git' before. I'm just an old-school procedural language, "patch -p0" kinda guy, good enough to mess with code until it does what I need it to do ;)

I appreciate your patience and input!

@MrDragon

This comment has been minimized.

Show comment
Hide comment
@MrDragon

MrDragon Aug 23, 2017

Contributor

Sorry if I put in too many pull requests - I think I may have finally figured out where to see if I already requested that or not. Not quite sure though...

Contributor

MrDragon commented Aug 23, 2017

Sorry if I put in too many pull requests - I think I may have finally figured out where to see if I already requested that or not. Not quite sure though...

@murrant murrant changed the title from Active Directory user in nested groups to feature: Active Directory user in nested groups Aug 25, 2017

@scrutinizer-notifier

This comment has been minimized.

Show comment
Hide comment
@scrutinizer-notifier

scrutinizer-notifier Aug 25, 2017

The inspection completed: 2 updated code elements

scrutinizer-notifier commented Aug 25, 2017

The inspection completed: 2 updated code elements

@murrant murrant merged commit 0a5b20c into librenms:master Aug 25, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Aug 25, 2017

Member

Nice work @MrDragon :)

Member

murrant commented Aug 25, 2017

Nice work @MrDragon :)

@laf laf referenced this pull request Aug 29, 2017

Merged

fix: Reverted previous active directory changes #7254 #7257

1 of 1 task complete
@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Aug 29, 2017

Member

@MrDragon We had to revert this PR due to reported issues of AD auth problems: #7254

Member

laf commented Aug 29, 2017

@MrDragon We had to revert this PR due to reported issues of AD auth problems: #7254

@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Aug 30, 2017

Member

Part of the issue is Config::get(), because some people have periods in groups and we use the group name as the key in the config.

Sorry about that. Just using $config[] will fix that. I'm not sure if we have other issues though.

Member

murrant commented Aug 30, 2017

Part of the issue is Config::get(), because some people have periods in groups and we use the group name as the key in the config.

Sorry about that. Just using $config[] will fix that. I'm not sure if we have other issues though.

murrant added a commit to murrant/librenms that referenced this pull request Aug 30, 2017

feature: AD support nested groups (resubmit librenms#7175)
Don't let groups with periods in the name cause issues.

@MrDragon MrDragon deleted the MrDragon:issue-2452 branch Aug 30, 2017

@MrDragon

This comment has been minimized.

Show comment
Hide comment
@MrDragon

MrDragon Aug 30, 2017

Contributor

Thank you for re-fixing that.

Contributor

MrDragon commented Aug 30, 2017

Thank you for re-fixing that.

@murrant murrant referenced this pull request Aug 30, 2017

Closed

User not found in AD group #7254

5 of 5 tasks complete

laf added a commit that referenced this pull request Oct 4, 2017

feature: AD now supports nested groups (resubmit #7175) (#7259)
* feature: AD support nested groups (resubmit #7175)
Don't let groups with periods in the name cause issues.

* Merge #7245 into this PR

* Capture Exceptions in get_userlevel()

* Throw generic error if auth_ad_debug is not enabled to prevent information leak.
@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

lock bot commented May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@lock lock bot locked as resolved and limited conversation to collaborators May 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.