Files
opencloud/tests/acceptance/features/apiTenancy/mutltiTenancy.feature
Ralf Haferkamp 6082e0c4df fix: Show username in unprivileged search results (#2104)
* fix: Show username in unprivileged search results

`onPremisesSamAccountName` is a mandatory attribute according to the
spec. There's no harm in returning it in the search results also for
unprivileged users.

Fixes: #144

* adapt tests

* adapt tests

* adapt tests

---------

Co-authored-by: Viktor Scharf <v.scharf@opencloud.eu>
2026-01-07 12:43:27 +01:00

78 lines
2.2 KiB
Gherkin

Feature: Multi-tenancy
I want to make sure that users from different tenants are isolated from each other,
so that each tenant's data and users remain private and secure.
Note:
All users are managed via LDAP and are assumed to exist.
Tests will use existing users without creating or deleting them.
Prepared LDAP users:
| user | tenant | group |
|-------|----------|----------------------|
| alice | tenant-1 | new-features-lovers |
| brian | tenant-1 | - |
| carol | tenant-2 | - |
| david | tenant-2 | release-lover |
Scenario: users from the same tenant can see each other
When user "Brian" searches for user "ali" using Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["value"],
"properties": {
"value": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"displayName",
"id",
"onPremisesSamAccountName",
"userType"
],
"properties": {
"displayName": {
"const": "Alice Hansen"
},
"id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"onPremisesSamAccountName": {
"const": "alice"
},
"userType": {
"const": "Member"
}
}
}
}
}
}
"""
Scenario: users from different tenants cannot see each other
When user "David" searches for user "brian" using Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["value"],
"properties": {
"value": {
"type": "array",
"minItems": 0,
"maxItems": 0
}
}
}
"""