core icon indicating copy to clipboard operation
core copied to clipboard

Can't disable share/share API in admin page

Open PVince81 opened this issue 12 years ago • 6 comments

Steps

  1. Go to "admin" page
  2. Uncheck "Enable Share API"
  3. Wait a bit for the server request
  4. Refresh the page

Expected result

Checkbox stays disabled

Actual result

Checkbox is still checked Looks like the settings wasn't saved.

Versions

ownCloud 7.0 pre-alpha (master)

@schiesbn are we supposed to be able to disable this here ? I noticed that to disable sharing I could simply disable the "Share files" app.

PVince81 avatar Feb 06 '14 11:02 PVince81

Same issue for "Allow links"...

Other checkboxes stay disabled.

Nothing in the logs.

I'll look into this as I need it to work to test something else where sharing is disabled.

PVince81 avatar Feb 06 '14 11:02 PVince81

it works correctly on ownCloud 6.0.1

dttpy avatar Feb 06 '14 11:02 dttpy

Thanks for the info @dttpy

Looks like I don't even have the shareapi_enabled key in the DB:

MariaDB [owncloud]> select * from oc_appconfig where appid='core';
+-------+----------------------------------+-----------------------------------------------------+
| appid | configkey                        | configvalue                                         |
+-------+----------------------------------+-----------------------------------------------------+
| core  | global_cache_gc_lastrun          | 1391687137                                          |
| core  | installedat                      | 1391603440.5491                                     |
| core  | lastupdatedat                    | 1391686016                                          |
| core  | lastupdateResult                 | {"version":{},"versionstring":{},"url":{},"web":{}} |
| core  | public_files                     | files_sharing/public.php                            |
| core  | public_gallery                   | gallery/public.php                                  |
| core  | public_webdav                    | files_sharing/public.php                            |
| core  | remote_core.css                  | /core/minimizer.php                                 |
| core  | remote_core.js                   | /core/minimizer.php                                 |
| core  | remote_files                     | files/appinfo/remote.php                            |
| core  | remote_filesync                  | files/appinfo/filesync.php                          |
| core  | remote_webdav                    | files/appinfo/remote.php                            |
| core  | shareapi_allow_mail_notification | no                                                  |
| core  | shareapi_allow_public_upload     | no                                                  |
| core  | shareapi_allow_resharing         | no                                                  |
+-------+----------------------------------+-----------------------------------------------------+

The code in ajax/appconfig.php seems to find it in the local config cache so it uses 'update' instead of 'insert'... which means that we can't trust the cache to reflect what's in the DB.

PVince81 avatar Feb 06 '14 11:02 PVince81

CC @icewind1991

I'll change it to try an update first, if that fails it will do an insert.

PVince81 avatar Feb 06 '14 11:02 PVince81

Fixed by above PR

PVince81 avatar Mar 19 '14 17:03 PVince81

Actually it was fixed by https://github.com/owncloud/core/pull/4624

PVince81 avatar Mar 19 '14 17:03 PVince81