nextcloud/groupfolders

Errors after using the advanced permissions of Groupfolder `master` branch

nabim777 opened this issue ยท 3 comments

Summary

The GroupFolders app gets an error after setting advanced permissions for a folder, causing the folder to disappear. This also affect in the server(Nextcloud), when trying to list the user gets an error.

Environment Details

Nextcloud: Stable 31 (master)
GroupFolders App: master
PHP Version: 8.2
Operating System: ubuntu 22.04

Step to Reproduce

  1. Use the latest commit of the groupfolder master branch.
  2. Go to the Groupfolder UI
  3. Create a folder named demo.
  4. Assign the group admin to the folder demo.
  5. Navigate to the Advanced Permissions tab for the folder and add admin (user) with advance permission.
  6. The app crashes, the folder demo disappears, and an error occurs when trying to view all accounts.

Screen record

Screencast.from.10-03-2024.01.04.24.PM.webm

Server logs

{
  "reqId": "Zv5AY7zDm6l4DkMQNTmitQAAAAc",
  "level": 3,
  "time": "2024-10-03T06:57:39+00:00",
  "remoteAddr": "::1",
  "user": "admin",
  "app": "PHP",
  "method": "GET",
  "url": "/stable31/ocs/v2.php/cloud/groups/admin/users/details?offset=0&limit=25&search=",
  "message": "Declaration of OCA\\GroupFolders\\ACL\\ACLStorageWrapper::getDirectoryContent($directory): Traversable|false must be compatible with OC\\Files\\Storage\\Wrapper\\Wrapper::getDirectoryContent($directory): Traversable at /home/nabin/www/stable31/apps/groupfolders/lib/ACL/ACLStorageWrapper.php#303",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
  "version": "31.0.0.3",
  "data": {
    "app": "PHP"
  }
}

finding

I think this issue is due to return type changes on this PR which was merged 2 days ago on server nextcloud/server#48454

Sorry, I know about this but didn't have the time to fix it yet. I'm on it now ๐Ÿ‘

You can use the branch of #3311 until it is merged.

Oh! Thanks for your quick response