-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When users change their groups in LDAP that is not followed up in WordPress. THis newly added test verifies that. Next up is fixing this problem
- Loading branch information
1 parent
d9f3a4f
commit c272594
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,3 +61,25 @@ Feature: Log in without group assignment | |
And the WordPress user "ldapuser" is member of role "wordpressrole" | ||
And the WordPress user "ldapuser" is not member of role "editor" | ||
And the WordPress user "ldapuser" is not member of role "subscriber" | ||
|
||
Scenario: Second Login with group assignment that changes between first and second login | ||
Given a default configuration | ||
And configuration value "GroupEnable" is set to "true" | ||
And configuration value "DefaultRole" is set to "subscriber" | ||
And configuration value "Groups" is set to "administrator=ldapgroup1" and "editor=ldapgroup2" | ||
And configuration value "GroupAttr" is set to "cn" | ||
And configuration value "GroupFilter" is set to "uniquemember=%dn%" | ||
And configuration value "GroupOverUser" is set to "false" | ||
And an LDAP user "ldapuser" with name "LDAP User", password "P@ssw0rd" and email "[email protected]" exists | ||
And an LDAP group "ldapgroup1" exists | ||
And an LDAP group "ldapgroup2" exists | ||
And LDAP user "ldapuser" is member of LDAP group "ldapgroup1" | ||
And LDAP user "ldapuser" logs in with password "P@ssw0rd" | ||
And LDAP user "ldapuser" is member of LDAP group "ldapgroup2" | ||
And LDAP user "ldapuser" is not member of LDAP group "ldapgroup1" | ||
When LDAP user "ldapuser" logs in with password "P@ssw0rd" | ||
Then the login suceeds | ||
And the WordPress user "ldapuser" is member of role "editor" | ||
And the WordPress user "ldapuser" is member of role "wordpressrole" | ||
And the WordPress user "ldapuser" is not member of role "administrator" | ||
And the WordPress user "ldapuser" is not member of role "subscriber" |