From fabb03ca6902513cf6efae1072cf9505b0acf5ed Mon Sep 17 00:00:00 2001 From: Abdullah Alhazmy Date: Fri, 3 Feb 2023 16:39:05 +0300 Subject: [PATCH] website/integrations: update NextCloud integration details (#4346) * Update nextcloud Documentation Signed-off-by: Abdullah Alhazmy * Update nextcloud Documentation Signed-off-by: Abdullah Alhazmy * format Signed-off-by: Jens Langhammer --------- Signed-off-by: Abdullah Alhazmy Signed-off-by: Jens Langhammer Co-authored-by: Jens Langhammer --- .../integrations/services/nextcloud/index.md | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/website/integrations/services/nextcloud/index.md b/website/integrations/services/nextcloud/index.md index d108bf243..fe7ea56b1 100644 --- a/website/integrations/services/nextcloud/index.md +++ b/website/integrations/services/nextcloud/index.md @@ -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():