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

Cannot remove advanced permissions for deleted group #1932

Closed
scharnkn opened this issue Mar 23, 2022 · 4 comments · Fixed by #3250
Closed

Cannot remove advanced permissions for deleted group #1932

scharnkn opened this issue Mar 23, 2022 · 4 comments · Fixed by #3250
Labels
2. developing Items that are currently under development bug feature: acl Items related to the groupfolders ACL or "Advanced Permissions"

Comments

@scharnkn
Copy link

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Create groupfolder and assign advanced permission for one or more groups, e.g.
    permissions_before
  2. Delete the admin group "admin-test2" in Nextcloud (without touching the groupfolders configuration)

Expected behaviour

Either the entry for advanced permissions should be deleted automatically (as it happens for the normal access permissions) or an admin user should be able to delete it themselves.

Actual behaviour

After deleting the group there is an "undefined" artifact in the advanced permissions list, which cannot be deleted permanently (it re-appears after reloading the page).

permissions_after

It should be noted that one work around to delete the entry is to recreate the deleted group with the exact same name and then first delete the advanced permissions and afterwards delete the group again.

Server configuration

Operating system: Debian 11

Web server: Nginx

Database: PostgreSQL

PHP version: 7.4

Nextcloud version: 23.0.2

Group folders version: 11.1.2

Updated from an older Nextcloud/ownCloud or fresh install: updated

Where did you install Nextcloud from: Manual

Are you using external storage, if yes which one: -

Are you using encryption: no

Are you using an external user-backend, if yes which one: -

Client configuration

Browser: Firefox 94.0.2 (64-Bit)

Operating system: Debian 12

Logs

Nextcloud log (data/nextcloud.log)

Nextcloud log
[index] Error: Argument 2 passed to OCA\GroupFolders\Controller\FolderController::setManageACL() must be of the type string, null given, called in /path/to/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 217 in file '/path/to/nextcloud/apps/groupfolders/lib/Controller/FolderController.php' line 161

POST /apps/groupfolders/folders/1374/manageACL
from XXXXXXXX by admin at 2022-03-23T09:35:26+00:00
@scharnkn scharnkn added 0. Needs triage Issues that need to be triaged bug labels Mar 23, 2022
@z0ow
Copy link

z0ow commented Apr 10, 2022

Same issue here. My logger output is the same with you and looks like this:

{"reqId":"QaB8aLw6CdGxrptT7MMA","level":3,"time":"2022-04-10T15:38:43+00:00","remoteAddr":"192.168.100.128","user":"admin","app":"index","method":"POST","url":"/apps/groupfolders/folders/3/manageACL","message":"OCA\\GroupFolders\\Controller\\FolderController::setManageACL(): Argument #2 ($mappingType) must be of type string, null given, called in /www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 217 in file '/www/nextcloud/apps/groupfolders/lib/Controller/FolderController.php' line 161","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36","version":"23.0.3.2","exception":{"Exception":"Exception","Message":"OCA\\GroupFolders\\Controller\\FolderController::setManageACL(): Argument #2 ($mappingType) must be of type string, null given, called in /www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 217 in file '/www/nextcloud/apps/groupfolders/lib/Controller/FolderController.php' line 161","Code":0,"Trace":[{"file":"/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/www/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":158,"Previous":{"Exception":"TypeError","Message":"OCA\\GroupFolders\\Controller\\FolderController::setManageACL(): Argument #2 ($mappingType) must be of type string, null given, called in /www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 217","Code":0,"Trace":[{"file":"/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"setManageACL","class":"OCA\\GroupFolders\\Controller\\FolderController","type":"->"},{"file":"/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/www/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/www/nextcloud/apps/groupfolders/lib/Controller/FolderController.php","Line":161},"CustomMessage":"--"},"id":"6252fc9c1d80f"}

This makes me can not add/remove advance permission to any old/new group folders so no one could see it 😞

@laarisyko
Copy link

I got the same issue. I can add new permissions, however I cant delete already xisiting ones. I have NC 25.0.1 and Groupfolder 13.1.0

@joshtrichards joshtrichards added the feature: acl Items related to the groupfolders ACL or "Advanced Permissions" label Sep 30, 2023
@provokateurin
Copy link
Member

Confirmed, the group also still shows up in the lists of groups that have access to the folder in the first place. The group should just get removed if it no longer exists.

@provokateurin provokateurin added the 1. to develop Issues that are ready for development label Sep 18, 2024
@provokateurin
Copy link
Member

Just saw that there is even code to handle this, but it just doesn't seem to work.

@provokateurin provokateurin linked a pull request Sep 19, 2024 that will close this issue
@provokateurin provokateurin added 2. developing Items that are currently under development and removed 0. Needs triage Issues that need to be triaged 1. to develop Issues that are ready for development labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Items that are currently under development bug feature: acl Items related to the groupfolders ACL or "Advanced Permissions"
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants