Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Added support for LDAP. #1124
base: master
Are you sure you want to change the base?
Added support for LDAP. #1124
Changes from 16 commits
9ef2ecc
74e92aa
6cc928e
32aeff2
16922d2
75dbdf1
7b2bb3e
e8237c9
7abdc21
11fd40d
248a4a8
9806378
4eb5981
996ea8d
7d6067f
42a926b
25741a6
d9c9d3d
7fda407
34bc4a9
e8b2178
3e6ab43
38ca1f0
f8d25b4
3d3e756
6e455eb
9a175df
0bfa4a8
8633f78
b7d68b3
bf0288f
4fb8397
171dab0
8885a9f
3f4c6a7
8583553
afb5d38
de8e4ff
12b4121
b492d70
cd967f1
4b3213a
3677285
d62f271
d576221
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With an LDAP-specific settings section, you could pass that full section in a single parameter instead of extracting this huge number of settings here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite get what you mean, that parameter would still need to read the values from the config file, resulting in even larger code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about something like
$authBackend = new \Baikal\Core\LDAP($this->pdo, 'users', $config['ldap]);
. The constructor internally needs a ton of lines to assign everything to member variables anyway.Alternatively, how about using an
LdapConfig
struct? Something like this:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ByteHamster, I see what you mean, but as LDAP config is set in "System Settings", it'll be saved under
$config['system']
. So either we create a new tab or we could add code inset
to handle LDAP set the values independently.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, an additional settings section sounds like a lot of work and also quite hacky. How do you feel about that "struct"? It would reduce the long list of constructor parameters, making it a bit easier to comprehend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ByteHamster, is this ok?