core
core copied to clipboard
Sharing section in settings should be removed when files_sharing is disabled
Steps to reproduce
- Go to Apps and disable "Share Files"
- Got to settings
Expected behaviour
Sharing section on the left is removed
Actual behaviour
Sharing section is still visible
Server configuration
Operating system: Ubuntu 20.04
Web server: Apache 2.4.41-4ubuntu3.11
Database: mariadb-server 10.3.34-0ubuntu0.20.04.1
PHP version: 7.4.3-4ubuntu2.10
ownCloud version: 10.9.1
Updated from an older ownCloud or fresh install: fresh
Where did you install ownCloud from: ownCloud Ansible scripts and ownCloud Docker
Signing status (ownCloud 9.0 and above):
No errors have been found.
List of activated apps:
Enabled:
- comments:
- Version: 0.3.0
- Path: /var/www/owncloud/apps/comments
- configreport:
- Version: 0.2.0
- Path: /var/www/owncloud/apps/configreport
- dav:
- Version: 0.7.0
- Path: /var/www/owncloud/apps/dav
- federatedfilesharing:
- Version: 0.5.0
- Path: /var/www/owncloud/apps/federatedfilesharing
- federation:
- Version: 0.1.0
- Path: /var/www/owncloud/apps/federation
- files:
- Version: 1.5.2
- Path: /var/www/owncloud/apps/files
- files_external:
- Version: 0.8.0
- Path: /var/www/owncloud/apps/files_external
- files_mediaviewer:
- Version: 1.0.5
- Path: /var/www/owncloud/apps/files_mediaviewer
- files_trashbin:
- Version: 0.9.1
- Path: /var/www/owncloud/apps/files_trashbin
- files_versions:
- Version: 1.3.0
- Path: /var/www/owncloud/apps/files_versions
- firstrunwizard:
- Version: 1.2.0
- Path: /var/www/owncloud/apps/firstrunwizard
- market:
- Version: 0.6.3
- Path: /var/www/owncloud/custom/market
- notifications:
- Version: 0.5.4
- Path: /var/www/owncloud/apps/notifications
- openidconnect:
- Version: 2.1.1
- Path: /var/www/owncloud/custom/openidconnect
- password_policy:
- Version: 2.1.4
- Path: /var/www/owncloud/custom/password_policy
- provisioning_api:
- Version: 0.5.0
- Path: /var/www/owncloud/apps/provisioning_api
- systemtags:
- Version: 0.3.0
- Path: /var/www/owncloud/apps/systemtags
- twofactor_totp:
- Version: 0.7.4
- Path: /var/www/owncloud/custom/twofactor_totp
- updatenotification:
- Version: 0.2.1
- Path: /var/www/owncloud/apps/updatenotification
- user_ldap:
- Version: 0.16.0
- Path: /var/www/owncloud/custom/user_ldap
Disabled:
- encryption:
- Path: /var/www/owncloud/apps/encryption
- external:
- Path: /var/www/owncloud/apps/external
- files_sharing:
- Path: /var/www/owncloud/apps/files_sharing
- user_external:
- Path: /var/www/owncloud/apps/user_external
- windows_network_drive:
- Path: /var/www/owncloud/custom/windows_network_drive
Are you using encryption: no
Are you using an external user-backend, if yes which one: Behaviour is independent of the backend, I also tested another system with another user-backend
Client configuration
Browser: Safari
Operating system: MacOS Monterey 12.4 (21F79)
Just adding the corresponding error from the owncloud.log
:
{
"reqId": "YqNXr910W0w0Q1bQCO6hMAAAAAM",
"level": 3,
"time": "2022-06-10 14:39:43.134800",
"remoteAddr": "46.142.176.205",
"user": "admin",
"app": "no app in context",
"method": "GET",
"url": "/index.php/settings/admin?sectionid=general",
"message": "Section id not found: \"sharing\". Apps should register settings sections in info.xml"
}
Note: the Sharing settings in the Personal settings section does disappear.
But the Sharing section in the Admin settings section is still rendered on the UI.
The code that renders the settings is in core https://github.com/owncloud/core/blob/master/settings/Panels/Admin/FileSharing.php https://github.com/owncloud/core/blob/master/settings/templates/panels/admin/filesharing.php
That code should really go somewhere in apps/files_sharing
and only be rendered when files_sharing
is enabled.
Note: I notice that there is also https://github.com/owncloud/core/blob/master/settings/templates/panels/admin/encryption.php - I think that also renders even when the encryption app is disabled, or does not exist.
The other panels-templates look like they are all real core things, that are not app functionality. So only files_sharing and encryption seem to have this problem.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.