You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Providing app blacklist/whitelist functionality in config.php #21566
Is your feature request related to a problem? Please describe.
There are situations where administrators may want to restrict the apps available within their organization.
Describe the solution you'd like
One possible solution would be to add code like this to the fetchApps function in ./apps/settings/lib/Controller/AppSettingsController.php:
$apps_whitelist = $this->config->getSystemValue('apps_whitelist');
if (is_array($apps_whitelist)) {
$apps = array_filter($apps, function($var) use ($apps_whitelist) {
return in_array($var['id'], $whitelist);
});
}
$apps_blacklist = $this->config->getSystemValue('apps_blacklist');
if (is_array($apps_blacklist)) {
$apps = array_filter($apps, function($var) use ($apps_blacklist) {
return ! in_array($var['id'], $apps_blacklist);
});
}
Then, in the config.php file, users could set apps_whitelist and apps_blacklist values.
Describe alternatives you've considered
A better solution would be to provide this functionality to admin users in the UI instead of config.php, but this would be a pretty simple implementation of the basic functionality.
I suppose it would be useful for at least two groups of people. If NC is installed for a company, the admins are likely not the people who installed the system nor are they part of the security team. Those other individuals may wish to restrict which apps are permitted based on company policy before turning the NC system over to those who will be admins.
The second group would be for hosting providers. There are several hosts which restrict which apps are available to their users (sometimes based on their payment tier). This would make it much easier to configure that capability.
A similar use case for an app blocklist comes to mind: a company running Nextcloud instances, some of which are resource contained enough (such as by a pricing tier and server RAM) to be unable to stably run Nextcloud Talk. The receiving client/group would need to be unable to install the app with their admin account, to prevent accidentally overloading their instance’s provisioned resources.
Activity
kesselb commentedon Jun 24, 2020
And this is good for? Only admins are able to install apps.
summersab commentedon Jun 25, 2020
I suppose it would be useful for at least two groups of people. If NC is installed for a company, the admins are likely not the people who installed the system nor are they part of the security team. Those other individuals may wish to restrict which apps are permitted based on company policy before turning the NC system over to those who will be admins.
The second group would be for hosting providers. There are several hosts which restrict which apps are available to their users (sometimes based on their payment tier). This would make it much easier to configure that capability.
olivia-fox commentedon Jul 3, 2020
A similar use case for an app blocklist comes to mind: a company running Nextcloud instances, some of which are resource contained enough (such as by a pricing tier and server RAM) to be unable to stably run Nextcloud Talk. The receiving client/group would need to be unable to install the app with their admin account, to prevent accidentally overloading their instance’s provisioned resources.
kesselb commentedon Jul 8, 2020
Closing as duplicate of #21057
szaimen commentedon Jun 23, 2021
Hi summersab, do you mind creating a PR with your patch for further discussion?
Thank you!
kesselb commentedon Oct 8, 2021
Scheduled for 23: #29135