1
0

openldap-numerical-id.feature 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. Feature: LDAP
  2. Background:
  3. Given using api version "2"
  4. And having a valid LDAP configuration
  5. And modify LDAP configuration
  6. | ldapExpertUsernameAttr | employeeNumber |
  7. | ldapLoginFilter | (&(objectclass=inetorgperson)(employeeNumber=%uid)) |
  8. # Those tests are dedicated to ensure Nc is working when it is provided with
  9. # users having numerical IDs
  10. Scenario: Look for a expected LDAP users
  11. Given As an "admin"
  12. And sending "GET" to "/cloud/users"
  13. Then the OCS status code should be "200"
  14. And the "users" result should match
  15. | 92379 | 1 |
  16. | 50194 | 1 |
  17. Scenario: check default home of an LDAP user
  18. Given As an "admin"
  19. And sending "GET" to "/cloud/users/92379"
  20. Then the OCS status code should be "200"
  21. And the record's fields should match
  22. | storageLocation | /dev/shm/nc_int/92379 |
  23. Scenario: Test by logging in
  24. Given cookies are reset
  25. And Logging in using web as "92379"
  26. And Sending a "GET" to "/remote.php/webdav/welcome.txt" with requesttoken
  27. Then the HTTP status code should be "200"
  28. Scenario: Test LDAP group retrieval with numeric group ids and nesting
  29. # Nesting does not play a role here really
  30. Given modify LDAP configuration
  31. | ldapBaseGroups | ou=NumericGroups,dc=nextcloud,dc=ci |
  32. | ldapGroupFilter | (objectclass=groupOfNames) |
  33. | ldapGroupMemberAssocAttr | member |
  34. | ldapNestedGroups | 1 |
  35. | useMemberOfToDetectMembership | 1 |
  36. And As an "admin"
  37. And sending "GET" to "/cloud/groups"
  38. Then the OCS status code should be "200"
  39. And the "groups" result should match
  40. | 2000 | 1 |
  41. | 3000 | 1 |
  42. | 3001 | 1 |
  43. | 3002 | 1 |
  44. Scenario: Test LDAP group membership with intermediate groups not matching filter, numeric group ids
  45. Given modify LDAP configuration
  46. | ldapBaseGroups | ou=NumericGroups,dc=nextcloud,dc=ci |
  47. | ldapGroupFilter | (&(cn=2000)(objectclass=groupOfNames)) |
  48. | ldapNestedGroups | 1 |
  49. | useMemberOfToDetectMembership | 1 |
  50. | ldapUserFilter | (&(objectclass=inetorgperson)(!(uid=alice))) |
  51. | ldapGroupMemberAssocAttr | member |
  52. And As an "admin"
  53. # for population
  54. And sending "GET" to "/cloud/groups"
  55. And sending "GET" to "/cloud/groups/2000/users"
  56. Then the OCS status code should be "200"
  57. And the "users" result should match
  58. | 92379 | 0 |
  59. | 54172 | 1 |
  60. | 50194 | 1 |
  61. | 59376 | 1 |
  62. | 59463 | 1 |