[SOLVED] How to limit to groups for one app?

Hi everyone :wave:

I have an app where I can limit to groups for usage.

But, I don’t know where is defined in my project ?

It’s to improve another app, I would like to implement this possibility.

Whether that option is available for an app or not depends on the types specified in appinfo/info.xml. Some types like filesystem/authentication currently don’t allow to limit the app to groups as it would be always loaded for those types.

The list of restricted types can be found here: server/AppManager.php at 66ffedcb1662088007711d132df7a630a313c572 · nextcloud/server · GitHub

A possible solution that some apps implement is to have a custom setting in the app and then check the group membership and manage access permissions on your own.

1 Like

I’m sorry Julius, I didn’t answer you :confused:

Thanks for your answer, it helped me :slight_smile:

But, it’s very strange to limit an app to suit its category ?

Feel free to open a feature request on GitHub - nextcloud/server: ☁️ Nextcloud server, a safe home for all your data but this is mostly due to how special app types like filesystem apps need to hook in early into the server processes and therefore we cannot easily enforce the group limitation, so this would need some proper planning on how that can made working.

As an additional comment, most apps that need to have a group limit while having either one of those types (e.g. Talk and Office) currently implement their own setting where the app can then enforce the group limit on API endpoints and pages where that is needed.