Allow values of attributes defined to be expanded and as such, match between the configured user type and the LDAP object entry (T496)
Details
Details
- Reviewers
machniak - Group Reviewers
Web Administration Panel Developers - Maniphest Tasks
- T496: Scoring adjustment needed for similar but not the same object types
- Commits
- rWAP9c3649a550fa: Allow values of attributes defined to be expanded and as such, match between…
No particular test plan.
Diff Detail
Diff Detail
- Repository
- rWAP webadmin
- Branch
- dev/T496
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Comment Actions
- Also expand the input correctly (in case the "static" value is an array), and unify the need for a base dn in to a function
Comment Actions
This way base_dn() method is executed multiple times, it should cache the result in memory to not call domain_info() every time. I suppose we could even check if the value contains replacement macro before we call expand().
Comment Actions
See inline comments. Other than that it looks good. Still we could improve performance for cases where value does not contain base_dn expansion macro. I think it would be good to improve Conf::expand() method so $custom could accept values of type function, then we could probably (untested) do:
$base_dn_fn = function() use ($this) { return $this->base_dn(); }; $this->conf->expand($_value, $custom = array('base_dn' => $base_dn_fn));
Of course , we can do this later.
lib/kolab_api_service.php | ||
---|---|---|
170 | Here we should cast $v to array. | |
372 | Here we could add $custom with base_dn, right? |