-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[Bug]: delete account screen doesn't block the functionality behind it #44488
Comments
I can look into this, however, I just to hear your reasoning on why should we block the functionality behind the deletion modal? If the user wants to click out, the user / group does not get deleted anyways. Just curious to hear your thoughts :) |
Thanks for looking into this! Here's why I think blocking the background during deletion is a good idea:
And, just to add, this functionality is already implemented in the disable account feature. 🙂 Hope that clears things up! Let me know what you think. |
Related: #44487 |
After reading this, I completely agree! I will start to work on this, and it seems like we can also tackle the issue mentioned above as while we are at it! Thank you for reporting the issue! |
Great to hear that we are on the same page. I have a small request could you please let me try to fix it myself with a deadline maximum of two days? |
Of course! We are always welcome towards having open source contributions! |
Hello @emoral435, thanks for allowing me to work on this issue I tried my best to work on it the maximum. I found the two functions that are related to the pop-up screen in that file and I found that both use a library for that pop-up screen which is dialogs. both functions use I tried to implement an overlay to block anything behind so the user could focus on the pop-up screen, but it didn't work I don't if the problem with my dev environment or I add it in a way that won't work. here is the update that I add it on the function deleteUser() {
const overlay = document.createElement('div');
overlay.style.position = 'fixed';
overlay.style.top = 0;
overlay.style.left = 0;
overlay.style.width = '100%';
overlay.style.height = '100%';
overlay.style.background = 'rgba(0, 0, 0, 0.5)';
overlay.style.zIndex = 9999;
document.body.appendChild(overlay);
const userid = this.user.id
OC.dialogs.confirmDestructive(
t('settings', 'Fully delete {userid}\'s account including all their personal files, app data, etc.', { userid }),
t('settings', 'Account deletion'),
{
type: OC.dialogs.YES_NO_BUTTONS,
confirm: t('settings', 'Delete {userid}\'s account', { userid }),
confirmClasses: 'error',
cancel: t('settings', 'Cancel'),
},
(result) => {
if (result) {
this.loading.delete = true
this.loading.all = true
return this.$store.dispatch('deleteUser', userid)
.then(() => {
this.loading.delete = false
this.loading.all = false
})
}
},
true,
)
}, |
I closed it by a mistake my apologies |
Hello @RayanBekri ! From here, I would suggest migration the old dialog API we have, and instead opt to use our NcDialog component and transition the logic from the current method to the new dialog. This also allows us to solve the issue for this problem 💪 if you want me to pick it up and fix it from here, let me know! |
I will give this a deadline of this Friday before I start working on it myself! 🫡 |
Sorry I didn't respond sooner I had lot of tasks to do and don't want to waste your time more I appreciate the opportunity that you gave me I will try to fix another issue soon or hunt another bug. |
Its no worries, ahaha! Thank you for pointing this out though, this was perfectly due for a migration 💖 |
hello @emoral435, I contacted @jadjoud since he had almost the same issue we worked together on it and we solved the bug. 😁 |
Sweet :) Thank you for the contributions ! :D 💙💙💙 |
Bug description
The delete account screen doesn't block any functionality behind it. when I go to users and I want to delete a user I can use the buttons behind the delete screen like I can navigate to anything. The delete account button should block anything behind it.
Steps to reproduce
Expected behavior
it shouldn't give you the ability to use anything behind until you click any button on that screen.
Installation method
Community Manual installation with Archive
Nextcloud Server version
master
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.3
Web server
None
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
Additional info
working with GitHub workspace
The text was updated successfully, but these errors were encountered: