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

[Bug]: delete account screen doesn't block the functionality behind it #44488

Closed
5 of 8 tasks
RayanBekri opened this issue Mar 26, 2024 · 14 comments · Fixed by #44676 or #44717
Closed
5 of 8 tasks

[Bug]: delete account screen doesn't block the functionality behind it #44488

RayanBekri opened this issue Mar 26, 2024 · 14 comments · Fixed by #44676 or #44717
Assignees
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 29-feedback bug feature: users and groups

Comments

@RayanBekri
Copy link

⚠️ This issue respects the following points: ⚠️

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.

bug-report

Steps to reproduce

  1. Go to users.
  2. Create a user if you don't have another (skip this if you have another users)
  3. click on more option on that user
  4. Choose delete user
  5. click on any button behind

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?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Cannot write into "config" directory!
This can usually be fixed by giving the web server write access to the config directory.

But, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.
See https://docs.nextcloud.com/server/29/go.php?to=admin-config
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
{
    "system": {
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "1025",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "supreme-space-adventure-rjp6vprj9xph56vg-80.app.github.dev"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "29.0.0.12",
        "overwrite.cli.url": "https:\/\/supreme-space-adventure-rjp6vprj9xph56vg-80.app.github.dev",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "updater.release.channel": "git",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "supreme-space-adventure-rjp6vprj9xph56vg-80.app.github.dev",
        "overwriteprotocol": "https"
    }
}
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
{
    "system": {
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "1025",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "supreme-space-adventure-rjp6vprj9xph56vg-80.app.github.dev"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "29.0.0.12",
        "overwrite.cli.url": "https:\/\/supreme-space-adventure-rjp6vprj9xph56vg-80.app.github.dev",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "updater.release.channel": "git",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "supreme-space-adventure-rjp6vprj9xph56vg-80.app.github.dev",
        "overwriteprotocol": "https"
    }
}
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(

List of activated Apps

Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Cannot write into "config" directory!
This can usually be fixed by giving the web server write access to the config directory.

But, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.
See https://docs.nextcloud.com/server/29/go.php?to=admin-config
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Enabled:
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contactsinteraction: 1.10.0
  - dashboard: 7.9.0
  - dav: 1.30.1
  - federatedfilesharing: 1.19.0
  - federation: 1.19.0
  - files: 2.1.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - lookup_server_connector: 1.17.0
  - oauth2: 1.17.0
  - provisioning_api: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - systemtags: 1.19.0
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - updatenotification: 1.19.1
  - user_status: 1.9.0
  - weather_status: 1.9.0
  - workflowengine: 2.11.0
Disabled:
  - admin_audit: 1.19.0
  - encryption: 2.17.0
  - files_external: 1.21.0
  - testing: 1.19.0
  - user_ldap: 1.20.0
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Enabled:
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contactsinteraction: 1.10.0
  - dashboard: 7.9.0
  - dav: 1.30.1
  - federatedfilesharing: 1.19.0
  - federation: 1.19.0
  - files: 2.1.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - lookup_server_connector: 1.17.0
  - oauth2: 1.17.0
  - provisioning_api: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - systemtags: 1.19.0
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - updatenotification: 1.19.1
  - user_status: 1.9.0
  - weather_status: 1.9.0
  - workflowengine: 2.11.0
Disabled:
  - admin_audit: 1.19.0
  - encryption: 2.17.0
  - files_external: 1.21.0
  - testing: 1.19.0
  - user_ldap: 1.20.0
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(

Nextcloud Signing status

No response

Nextcloud Logs

{"reqId":"5Nl8LzN7J1n3IVIvVSCD","level":2,"time":"2024-03-26T13:07:50+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Transaction took 3.393354177475s","userAgent":"--","version":"29.0.0.12","exception":{"Exception":"Exception","Message":"Transaction took 3.393354177475s","Code":0,"Trace":[{"file":"/var/www/html/lib/private/DB/Migrator.php","line":165,"function":"commit","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/html/lib/private/DB/Migrator.php","line":67,"function":"applySchema","class":"OC\\DB\\Migrator","type":"->"},{"file":"/var/www/html/lib/private/DB/Connection.php","line":659,"function":"migrate","class":"OC\\DB\\Migrator","type":"->"},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":450,"function":"migrateToSchema","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":401,"function":"migrateSchemaOnly","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/var/www/html/lib/private/Setup/AbstractDatabase.php","line":161,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/var/www/html/lib/private/Setup.php","line":359,"function":"runMigrations","class":"OC\\Setup\\AbstractDatabase","type":"->"},{"file":"/var/www/html/core/Command/Maintenance/Install.php","line":104,"function":"install","class":"OC\\Setup","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/symfony/console/Command/Command.php","line":298,"function":"execute","class":"OC\\Core\\Command\\Maintenance\\Install","type":"->"},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":1040,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":301,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":171,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/lib/private/Console/Application.php","line":213,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/console.php","line":113,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/html/occ","line":11,"args":["/var/www/html/console.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":691,"message":"Transaction took 3.393354177475s","exception":{},"CustomMessage":"Transaction took 3.393354177475s"}}
{"reqId":"5Nl8LzN7J1n3IVIvVSCD","level":2,"time":"2024-03-26T13:08:02+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Transaction took 1.2550518512726s","userAgent":"--","version":"29.0.0.12","exception":{"Exception":"Exception","Message":"Transaction took 1.2550518512726s","Code":0,"Trace":[{"file":"/var/www/html/lib/private/DB/Migrator.php","line":165,"function":"commit","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/html/lib/private/DB/Migrator.php","line":67,"function":"applySchema","class":"OC\\DB\\Migrator","type":"->"},{"file":"/var/www/html/lib/private/DB/Connection.php","line":659,"function":"migrate","class":"OC\\DB\\Migrator","type":"->"},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":450,"function":"migrateToSchema","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":401,"function":"migrateSchemaOnly","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/var/www/html/lib/private/Installer.php","line":574,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/var/www/html/lib/private/Installer.php","line":541,"function":"installShippedApp","class":"OC\\Installer","type":"::"},{"file":"/var/www/html/lib/private/Setup.php","line":402,"function":"installShippedApps","class":"OC\\Installer","type":"::"},{"file":"/var/www/html/core/Command/Maintenance/Install.php","line":104,"function":"install","class":"OC\\Setup","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/symfony/console/Command/Command.php","line":298,"function":"execute","class":"OC\\Core\\Command\\Maintenance\\Install","type":"->"},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":1040,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":301,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":171,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/lib/private/Console/Application.php","line":213,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/console.php","line":113,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/html/occ","line":11,"args":["/var/www/html/console.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":691,"message":"Transaction took 1.2550518512726s","exception":{},"CustomMessage":"Transaction took 1.2550518512726s"}}

Additional info

working with GitHub workspace

@RayanBekri RayanBekri added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Mar 26, 2024
@emoral435 emoral435 self-assigned this Mar 26, 2024
@emoral435
Copy link
Contributor

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 :)

@RayanBekri
Copy link
Author

Thanks for looking into this! Here's why I think blocking the background during deletion is a good idea:

  1. No Accidental Clicks: It prevents accidentally clicking something else while trying to make a decision about deletion.
  2. Focus: It helps users concentrate on deciding whether to delete, without distractions.
  3. What Users Expect: Most apps and websites don't let you click on other things when a pop-up is open. It keeps things simple and avoids confusion.

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.

@joshtrichards
Copy link
Member

Related: #44487

@emoral435
Copy link
Contributor

Let me know what you think.

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!

@RayanBekri
Copy link
Author

Let me know what you think.

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?
I really want to give it a shot and be helpful to the community.

@emoral435
Copy link
Contributor

Of course! We are always welcome towards having open source contributions!

@RayanBekri
Copy link
Author

RayanBekri commented Apr 1, 2024

Hello @emoral435,

thanks for allowing me to work on this issue I tried my best to work on it the maximum.
when I opened the project on my PC using github workspace I tried my best I found the part that uses that function in the next path apps/settings/src/components/Users/UserRowActions.vue and I tried to fix it.

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 dialogs.confirmDestructive

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,
			)
		},

@RayanBekri RayanBekri reopened this Apr 1, 2024
@RayanBekri
Copy link
Author

I closed it by a mistake my apologies

@emoral435
Copy link
Contributor

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!

@emoral435
Copy link
Contributor

I will give this a deadline of this Friday before I start working on it myself! 🫡

@RayanBekri
Copy link
Author

RayanBekri commented Apr 3, 2024

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.
Thanks again @emoral435 🫡

@emoral435
Copy link
Contributor

emoral435 commented Apr 5, 2024

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 💖

@jadjoud jadjoud mentioned this issue Apr 5, 2024
5 tasks
@RayanBekri
Copy link
Author

RayanBekri commented Apr 5, 2024

hello @emoral435,

I contacted @jadjoud since he had almost the same issue we worked together on it and we solved the bug. 😁

@emoral435
Copy link
Contributor

Sweet :) Thank you for the contributions ! :D 💙💙💙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 29-feedback bug feature: users and groups
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants