website/integrations: update NextCloud integration details (#4346)

* Update nextcloud Documentation

Signed-off-by: Abdullah Alhazmy <me@alhazmy13.net>

* Update nextcloud Documentation

Signed-off-by: Abdullah Alhazmy <me@alhazmy13.net>

* format

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Abdullah Alhazmy <me@alhazmy13.net>
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Abdullah Alhazmy 2023-02-03 16:39:05 +03:00 committed by GitHub
parent 352a2057dd
commit fabb03ca69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 3 deletions

View File

@ -74,14 +74,30 @@ See https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/r
Create a group for each different level of quota you want users to have. Set a custom attribute, for example called `nextcloud_quota`, to the quota you want, for example `15 GB`.
Afterwards, create a custom SAML Property Mapping with the name `SAML Nextcloud Quota`.
Set the _SAML Name_ to `nextcloud_quota`.
Set the _Expression_ to `return user.group_attributes().get("nextcloud_quota", "1 GB")`, where `1 GB` is the default value for users that don't belong to another group (or have another value set).
- Set the _SAML Attribute Name_ to `nextcloud_quota`.
- Set the _Expression_ to:
```python
return user.group_attributes().get("nextcloud_quota", "1 GB")
```
where `1 GB` is the default value for users that don't belong to another group (or have another value set).
Then, edit the Nextcloud SAML Provider, and add `nextcloud_quota` to Property mappings.
In Nextcloud, go to `Settings`, then `SSO & SAML Authentication`Under `Attribute mapping`, set this value:
- Attribute to map the quota to.: `nextcloud_quota`
## Admin Group
To give authentik users admin access to your Nextcloud instance, you need to create a custom Property Mapping that maps an authentik group to "admin". It has to be mapped to "admin" as this is static in Nextcloud and cannot be changed.
Create a SAML Property mapping with the SAML Name "http://schemas.xmlsoap.org/claims/Group" and this expression:
Create a custom SAML Property Mapping:
- Set the _SAML Attribute Name_ to `http://schemas.xmlsoap.org/claims/Group`.
- Set the _Expression_ to:
```python
for group in user.ak_groups.all():