Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharing section in settings should be removed when files_sharing is disabled #40131

Open
d7oc opened this issue Jun 10, 2022 · 4 comments
Open
Labels

Comments

@d7oc
Copy link
Contributor

d7oc commented Jun 10, 2022

Steps to reproduce

  1. Go to Apps and disable "Share Files"
  2. 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)

@d7oc
Copy link
Contributor Author

d7oc commented Jun 10, 2022

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"
}

@phil-davis
Copy link
Contributor

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.

@phil-davis
Copy link
Contributor

phil-davis commented Jun 20, 2022

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.

@github-actions
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants