Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rsdev 275 transfer forms on user deletion #95

Conversation

rs-fraser
Copy link
Contributor

@rs-fraser rs-fraser commented Aug 27, 2024

When a sysadmin deletes a user, and the user has created forms which have been used by other users to create documents, those forms will be transferred to the sysadmin so that the deletion can take place.

If this is the case, the sysadmin is show a warning when they try to delete the user that forms will be transferred under their ownership:
image

Also some code cleanup on the files I changed.

I'm still working on the format of the audit trail message (it should show type FORM and probably the form ID) but everything else is good to go so raising the PR now so we can begin review earlier with the release coming up.

The accompanying rspace-core-model PR add some annotations to the Form classes, so that the relevant fields display properly in the audit trail:
Screenshot from 2024-08-27 12-22-18

…eted) to end of createdBy in db. first attempt at showing warning on front-end.
…ther than all of the forms created by the user being deleted. add more docs and tidy up naming.
…nce the createdBy user can be deleted. remove test which is no longer relevant
Copy link
Contributor

@mKowalski256 mKowalski256 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good to me and work fine on AWS build.

Functionality-wise I think there should be more changes to UI dialog that is shown to sysadmin when user has forms - the transfer part is new and has non-intuitive consequences, but I feel the new text it's easy to miss if someone has used this dialog before an no longer goes through the text.

E.g. the part explaining the forms could be more distinguished graphically, with more/shorter fragments in bold. The label of confirmation button could be changed to 'transfer forms and delete'. Something like that:
image

@rs-fraser
Copy link
Contributor Author

Code changes look good to me and work fine on AWS build.

Functionality-wise I think there should be more changes to UI dialog that is shown to sysadmin when user has forms - the transfer part is new and has non-intuitive consequences, but I feel the new text it's easy to miss if someone has used this dialog before an no longer goes through the text.

E.g. the part explaining the forms could be more distinguished graphically, with more/shorter fragments in bold. The label of confirmation button could be changed to 'transfer forms and delete'. Something like that: image

Updated version:
image

@rs-fraser rs-fraser merged commit 03de3f3 into rspace-os:main Sep 2, 2024
2 checks passed
@rs-fraser rs-fraser deleted the rsdev-275-transfer-forms-on-user-deletion branch September 2, 2024 15:01
@github-actions github-actions bot locked and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants