Closed stevebauman closed 10 months ago
Just FYI I ran this branch through my LDAP torture-test suite, and it passes.
@cheesegrits This has been released, thanks again for your help on this! 🙏
https://github.com/DirectoryTree/LdapRecord-Laravel/releases/v3.0.8
Closes https://github.com/DirectoryTree/LdapRecord-Laravel/issues/561 Closes https://github.com/DirectoryTree/LdapRecord-Laravel/pull/565
This PR implements emulating virtual attributes (
memberof
only right now) in the Directory Emulator. More attributes can be added if necessary by developers using the public attribute arrays inside of each observer.This fixes the issue namely with attaching/detaching user groups and having the changes automatically reflected in the related models virtual attribute. This now works as it would with a real LDAP server. For example:
This also fixes an issue where a model is renamed in the Directory Emulator, but the rename didn't update in relationships it's apart of.
Huge kudos and credit goes to @cheesegrits for this, as this is all inspired from his original PR https://github.com/DirectoryTree/LdapRecord-Laravel/pull/565.