Content
View differences
Updated by Marc Alcobé about 3 years ago
Research the group folder feature of Nextcloud, its usage and limitations.
## Acceptance criteria
On installation or migration the following logic should be applied:
* Check if the installation is "blank" so that we can safely create the missing user, group and group folder.
* Also check if the installation was already complete as it could be that user, group and group folder already correctly exist from an earlier installation. If there is everything in place and correctly setup then reuse the existing ones. The combination of group folder, group user and user is so unique that I believe that it is safe to assume that these objects are there from an earlier installation.
* If any of the objects exists, but the setup appears incomplete, don't proceed in creating them. Instead show an error message explaining that there cannot be a user, group and group folder with the name "OpenProject". The user should either fix the setup manually if she wants to reuse them or rename them.
* In case the it is "blank" then
* Create the group "OpenProject"
* Create the user "OpenProject" and make it group admin of "OpenProject" so that it can manage its group memberships.
* Create the group folder "OpenProject" and bind it to group "OpenProject". Make the user "OpenProject" have "advanced permissions" to manage access control lists for files and folders.
* Generate an app password for the "OpenProject" user and show it to the Nextcloud admin.
* In order to allow this automation, an extra step of both Nextcloud and OpenProject setup will be added in order to select if the users want the "Automatically managed folders" active or not. Because of that the button value of **step 3** also changes to "Yes, I have copied these values" **(**[**visuals**](https://community.openproject.org/#previous-step-step-3)**).**
* The switch on the step 4 is by default active.
* Two flows are possible from a UX perspective in the Nextcloud side:
* **Automatically managed folders active (**[**visuals**](https://community.openproject.org/#automatically-managed-folders-active)**):**
* In the step 4 the user keeps the switch called "Automatically managed folders" active.
* The button "Setup OpenProject user, group and folder" which triggers the creation of all related elements needed to be able tu use this function. This button also saves the switch status.
* If all the checks and creations related to the button are successful a new step (#5) will appear called "Project folders application connection" which will contain the input field with the application password that can be copied to the OpenProject administration settings.
* There is a possibility that the button action triggers some errors which will be displayed between the explanation text and the button in red. The errors could be because of not having the group folder app installed or because the name used for the group folder already exists. When this happens, the button text string should change to "Retry setup OpenProject user, group and folder".
* Once all the steps are successfully completed, these will be marked with a green tick in the overview of the setup.
* **Automatically managed folders inactive (**[**visuals**](https://community.openproject.org/#automatically-managed-folders-inactive)**):**
* In the step 4 the user deactivate the switch "Automatically managed folders".
* The field inside of the step 4 called OpenProject user, group and folder with and its explanation text are hidden.
* The button label should in this case be "Complete without project folders".
* If the user chose to not activate this option the last step will be marked with a "minus" icon and left grey in the overview of the setup.
* Editing the decision taken before hand will always be possible from both sides:
* **Replace application password (**[**visuals**](https://community.openproject.org/#replace-application-password)**):**
* The user clicks on the button of "Replace application password" and access the new password that needs to be copied to the OpenProject administration settings.
* Can confirm the setup using the button bellow once the new password is copied.
* **From active to inactive (**[**visuals**](https://community.openproject.org/#from-active-to-inactive)**):**
* The users clicks on the button "Edit managed project folders" and the information about project folders is displayed with the switch active and a button text saying "Keep current setup".
* The user deactivates the switch and the OpenProject user, group and folder with, its explanation text and the step 5 (Application password) are hidden.
* User can complete the deactivation by clicking the button "Complete without project folders".
* **From inactive to active (**[**visuals**](https://community.openproject.org/#from-inactive-to-active)**):**
* The users clicks on the button "Edit managed project folders" and the information about project folders is displayed with the switch active and a button text saying "Keep current setup".
* The user activates the switch and the OpenProject user, group and folder with, its explanation text are shown. Also the button updates its text to "Setup OpenProject user, group and folder".
* When the users click on the button the triggers, actions and possible errors specified in the on the "Automatically **"Automatically managed folders active" active"** flow above are performed.
* Once the setup is complete with a "Automatically managed folders" active, every time a user enters this page a check is performed to see if the status of the integration is correct. In case this status fail, an error message will be displayed in the step number 4. ([**visuals**](https://community.openproject.org/#error-while-loading-the-integration-page))
## Visuals
#### **Previous step (Step 3):**
**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52626/content">**
#### **Automatically managed folders active:**
**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52627/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52629/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52628/content">**
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52630/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52631/content">
#### **Automatically managed folders inactive:**
**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52637/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52636/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52635/content">**
#### **Replace application password:**
**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52638/content">**
#### **Error while loading the integration page:**
**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52997/content">**
#### From active to inactive:
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52639/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52640/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52641/content">
#### From inactive to active
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52642/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52643/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52645/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52644/content">
## Figma
https://www.figma.com/file/gtLQfPe09X7XugAH8L7dTy/Nextcloud-Integration?node-id=3557%3A102906&t=KiKnF5CTawbBH58o-4
## Acceptance criteria
On installation or migration the following logic should be applied:
* Check if the installation is "blank" so that we can safely create the missing user, group and group folder.
* Also check if the installation was already complete as it could be that user, group and group folder already correctly exist from an earlier installation. If there is everything in place and correctly setup then reuse the existing ones. The combination of group folder, group user and user is so unique that I believe that it is safe to assume that these objects are there from an earlier installation.
* If any of the objects exists, but the setup appears incomplete, don't proceed in creating them. Instead show an error message explaining that there cannot be a user, group and group folder with the name "OpenProject". The user should either fix the setup manually if she wants to reuse them or rename them.
* In case the it is "blank" then
* Create the group "OpenProject"
* Create the user "OpenProject" and make it group admin of "OpenProject" so that it can manage its group memberships.
* Create the group folder "OpenProject" and bind it to group "OpenProject". Make the user "OpenProject" have "advanced permissions" to manage access control lists for files and folders.
* Generate an app password for the "OpenProject" user and show it to the Nextcloud admin.
* In order to allow this automation, an extra step of both Nextcloud and OpenProject setup will be added in order to select if the users want the "Automatically managed folders" active or not. Because of that the button value of **step 3** also changes to "Yes, I have copied these values" **(**[**visuals**](https://community.openproject.org/#previous-step-step-3)**).**
* The switch on the step 4 is by default active.
* Two flows are possible from a UX perspective in the Nextcloud side:
* **Automatically managed folders active (**[**visuals**](https://community.openproject.org/#automatically-managed-folders-active)**):**
* In the step 4 the user keeps the switch called "Automatically managed folders" active.
* The button "Setup OpenProject user, group and folder" which triggers the creation of all related elements needed to be able tu use this function. This button also saves the switch status.
* If all the checks and creations related to the button are successful a new step (#5) will appear called "Project folders application connection" which will contain the input field with the application password that can be copied to the OpenProject administration settings.
* There is a possibility that the button action triggers some errors which will be displayed between the explanation text and the button in red. The errors could be because of not having the group folder app installed or because the name used for the group folder already exists. When this happens, the button text string should change to "Retry setup OpenProject user, group and folder".
* Once all the steps are successfully completed, these will be marked with a green tick in the overview of the setup.
* **Automatically managed folders inactive (**[**visuals**](https://community.openproject.org/#automatically-managed-folders-inactive)**):**
* In the step 4 the user deactivate the switch "Automatically managed folders".
* The field inside of the step 4 called OpenProject user, group and folder with and its explanation text are hidden.
* The button label should in this case be "Complete without project folders".
* If the user chose to not activate this option the last step will be marked with a "minus" icon and left grey in the overview of the setup.
* Editing the decision taken before hand will always be possible from both sides:
* **Replace application password (**[**visuals**](https://community.openproject.org/#replace-application-password)**):**
* The user clicks on the button of "Replace application password" and access the new password that needs to be copied to the OpenProject administration settings.
* Can confirm the setup using the button bellow once the new password is copied.
* **From active to inactive (**[**visuals**](https://community.openproject.org/#from-active-to-inactive)**):**
* The users clicks on the button "Edit managed project folders" and the information about project folders is displayed with the switch active and a button text saying "Keep current setup".
* The user deactivates the switch and the OpenProject user, group and folder with, its explanation text and the step 5 (Application password) are hidden.
* User can complete the deactivation by clicking the button "Complete without project folders".
* **From inactive to active (**[**visuals**](https://community.openproject.org/#from-inactive-to-active)**):**
* The users clicks on the button "Edit managed project folders" and the information about project folders is displayed with the switch active and a button text saying "Keep current setup".
* The user activates the switch and the OpenProject user, group and folder with, its explanation text are shown. Also the button updates its text to "Setup OpenProject user, group and folder".
* When the users click on the button the triggers, actions and possible errors specified in the on the "Automatically
* Once the setup is complete with a "Automatically managed folders" active, every time a user enters this page a check is performed to see if the status of the integration is correct. In case this status fail, an error message will be displayed in the step number 4. ([**visuals**](https://community.openproject.org/#error-while-loading-the-integration-page))
## Visuals
#### **Previous step (Step 3):**
**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52626/content">**
#### **Automatically managed folders active:**
**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52627/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52629/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52628/content">**
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52630/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52631/content">
#### **Automatically managed folders inactive:**
**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52637/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52636/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52635/content">**
#### **Replace application password:**
**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52638/content">**
#### **Error while loading the integration page:**
**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52997/content">**
#### From active to inactive:
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52639/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52640/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52641/content">
#### From inactive to active
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52642/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52643/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52645/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52644/content">
## Figma
https://www.figma.com/file/gtLQfPe09X7XugAH8L7dTy/Nextcloud-Integration?node-id=3557%3A102906&t=KiKnF5CTawbBH58o-4