summaryrefslogtreecommitdiffstats
path: root/build/integration/ldap_features/openldap-uid-username.feature
blob: d267870ca26f81e38631895891966f8cbafd16b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Feature: LDAP
  Background:
    Given using api version "2"
    And having a valid LDAP configuration
    And modify LDAP configuration
      | ldapExpertUsernameAttr | uid |

  Scenario: Look for a expected LDAP users
    Given As an "admin"
    And sending "GET" to "/cloud/users"
    Then the OCS status code should be "200"
    And the "users" result should match
      | alice | 1 |
      | elisa | 1 |
      | ghost | 0 |

  Scenario: check default home of an LDAP user
    Given As an "admin"
    And sending "GET" to "/cloud/users/alice"
    Then the OCS status code should be "200"
    And the record's fields should match
      | storageLocation | /dev/shm/nc_int/alice |

  Scenario: check custom relative home of an LDAP user
    Given modify LDAP configuration
      | homeFolderNamingRule | sn |
    And As an "admin"
    And sending "GET" to "/cloud/users/alice"
    Then the OCS status code should be "200"
    And the record's fields should match
      | storageLocation | /dev/shm/nc_int/Alfgeirdottir |

  Scenario: check custom absolute home of an LDAP user
    Given modify LDAP configuration
      | homeFolderNamingRule | roomNumber |
    And As an "admin"
    And sending "GET" to "/cloud/users/elisa"
    Then the OCS status code should be "200"
    And the record's fields should match
      | storageLocation | /dev/shm/elisa-data |

  Scenario: Fetch all users, invoking pagination
    Given modify LDAP configuration
      | ldapBaseUsers  | ou=PagingTest,dc=nextcloud,dc=ci |
      | ldapPagingSize | 2                                |
    And As an "admin"
    And sending "GET" to "/cloud/users"
    Then the OCS status code should be "200"
    And the "users" result should match
      | ebba    | 1 |
      | eindis  | 1 |
      | fjolnir | 1 |
      | gunna   | 1 |
      | juliana | 1 |
      | leo     | 1 |
      | stigur  | 1 |

  Scenario: Fetch all users, invoking pagination
    Given modify LDAP configuration
      | ldapBaseUsers  | ou=PagingTest,dc=nextcloud,dc=ci |
      | ldapPagingSize | 2                                |
    And As an "admin"
    And sending "GET" to "/cloud/users?limit=10"
    Then the OCS status code should be "200"
    And the "users" result should match
      | ebba    | 1 |
      | eindis  | 1 |
      | fjolnir | 1 |
      | gunna   | 1 |
      | juliana | 1 |
      | leo     | 1 |
      | stigur  | 1 |

  Scenario: Fetch from second batch of all users, invoking pagination
    Given modify LDAP configuration
      | ldapBaseUsers  | ou=PagingTest,dc=nextcloud,dc=ci |
      | ldapPagingSize | 2                                |
    And As an "admin"
    And sending "GET" to "/cloud/users?limit=10&offset=2"
    Then the OCS status code should be "200"
    And the "users" result should contain "5" of
      | ebba    |
      | eindis  |
      | fjolnir |
      | gunna   |
      | juliana |
      | leo     |
      | stigur  |