Cook
September 21, 2022, 5:29pm
1
Nextcloud version: 24.0.5
Operating system and version; Debian GNU/Linux 10 (buster)
Apache or nginx version: nginx/1.22.0
PHP version: PHP 8.1.9
My question is, how do you actually use appsallowlist
parameter in config.php?
The official documentation says:
Filters allowed installable apps from the appstore.
Empty array will prevent all apps from the store to be found.
In config.php, if I do an empty array:
'appsallowlist' => [],
nothing happens, i.e. all apps are still visible and installable via GUI. Nginx and php processes restarted of course.
If I add some apps:
'appsallowlist' => [
'news',
'music',
'carnet',
],
I would expect only the listed apps would be available for installation via GUI, but again, all apps are visible and installable.
So, am I doing something wrong or not understanding correctly what it should do? My understanding is if I list the apps in that config parameter, only listed apps will be visible and available for installation/download. If the app is not listed, then it is not visible nor installable via Admin GUI.
I have the same question today about the ‘appsallowlist’ parameter.
So I take a look at the code and found this in lib/private/App/AppStore/Fetcher/AppFetcher.phpadmin
:
// If the admin specified a allow list, filter apps from the appstore
if (is_array($allowList) && $this->registry->delegateHasValidSubscription()) {
return array_filter($apps, function ($app) use ($allowList) {
return in_array($app['id'], $allowList);
});
}
Conclusion : this is a “premium” feature, only available if you have a Nextcloud subscription
jtr
January 24, 2024, 9:26pm
3
I think it was implemented to function with custom app stores. This was the original spec:
opened 08:32PM - 23 Aug 21 UTC
closed 07:50AM - 14 Oct 21 UTC
enhancement
1. to develop
feature: apps management
<!--
Thanks for reporting issues back to Nextcloud!
Note: This is the **issu… e tracker of Nextcloud**, please do NOT use this to get answers to your questions or get help for fixing your installation. This is a place to report bugs to developers, after your server has been debugged. You can find help debugging your system on our home user forums: https://help.nextcloud.com or, if you use Nextcloud in a large organization, ask our engineers on https://portal.nextcloud.com. See also https://nextcloud.com/support for support options.
Nextcloud is an open source project backed by Nextcloud GmbH. Most of our volunteers are home users and thus primarily care about issues that affect home users. Our paid engineers prioritize issues of our customers. If you are neither a home user nor a customer, consider paying somebody to fix your issue, do it yourself or become a customer.
Guidelines for submitting issues:
* Please search the existing issues first, it's likely that your issue was already reported or even fixed.
- Go to https://github.com/nextcloud and type any word in the top search/command bar. You probably see something like "We couldn’t find any repositories matching ..." then click "Issues" in the left navigation.
- You can also filter by appending e. g. "state:open" to the search string.
- More info on search syntax within github: https://help.github.com/articles/searching-issues
* This repository https://github.com/nextcloud/server/issues is *only* for issues within the Nextcloud Server code. This also includes the apps: files, encryption, external storage, sharing, deleted files, versions, LDAP, and WebDAV Auth
* SECURITY: Report any potential security bug to us via our HackerOne page (https://hackerone.com/nextcloud) following our security policy (https://nextcloud.com/security/) instead of filing an issue in our bug tracker.
* The issues in other components should be reported in their respective repositories: You will find them in our GitHub Organization (https://github.com/nextcloud/)
-->
### How to use GitHub
* Please use the 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are interested into the same feature.
* 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.
### Requirements
- Make it possible for providers to only show selected apps in the apps management
- Make it possible for Nextcloud to only show selected apps for Enterprise users
- Low development effort
- No maintenance of multiple app stores
- No additional work for app developers
### Approach
If the Nextcloud is an Enterprise instance then it should check for a local file that defines the list of allowed apps. If no local file exists then a file from apps.nextcloud.com should be used for the list of allowed Enterprise apps. The subscription key should be transferred to make authentication possible in the future and maybe return a custom list.
### Dummy code
```
if (EnterpriseVersion) {
if (file_exist(‘config/apps.json’)) {
//read ‘config/json’ into array $allow_apps;
} elseif (file_exists(‘https://apps.nextcloud.com/enterpriseapps.json?key=$subscriptionkey'))
// read ‘https://apps.nextcloud.com/enterpriseapps.json?key=$subscriptionkey' into array $allow_apps;
}
$appstore_apps = readfromappstore();
if exists($allow_apps;) {
$appstore_apps = array_intersect ($appstore_apps, $allow_apps)
}
```