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

group named "0" cannot be deleted by WebUI #29051

Closed
individual-it opened this issue Sep 19, 2017 · 10 comments
Closed

group named "0" cannot be deleted by WebUI #29051

individual-it opened this issue Sep 19, 2017 · 10 comments
Assignees
Milestone

Comments

@individual-it
Copy link
Member

individual-it commented Sep 19, 2017

Steps to reproduce

  1. create a group called "0"
  2. navigate to the Files Page and back to the Users Page
  3. try to delete the group by webUI

Expected behaviour

group should be deleted permanently

Actual behaviour

after reload the group is still there
deleting works fine from CLI
similar to #28406
most likely caused by #22522

Server configuration

Operating system:
Debian
Web server:
Apache 2
Database:
Sqlite
PHP version:
7.1
ownCloud version: (see ownCloud admin page)
10.0.3 (git)
Updated from an older ownCloud or fresh install:
fresh
Where did you install ownCloud from:
git

The content of config/config.php:

{
    "system": {
        "instanceid": "oc9xsmdtnlru",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost"
        ],
        "datadirectory": "\/home\/artur\/www\/owncloud-core\/data",
        "overwrite.cli.url": "http:\/\/localhost\/owncloud-core",
        "dbtype": "sqlite3",
        "logtimezone": "UTC",
        "installed": true,
        "license-key": "***REMOVED SENSITIVE VALUE***",
        "default_language": "en",
        "files_external_allow_create_new_local": "true",
        "theme": "",
        "loglevel": 2,
        "maintenance": false,
        "log_type": "owncloud",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "debug": false,
        "skeletondirectory": "\/home\/artur\/www\/owncloud-core\/tests\/ui\/skeleton",
        "version": "10.0.3.3",
        "firewall.debug": 1,
        "csrf.disabled": true,
        "firewall.rules": "[]"
    }
}

List of activated apps:

Enabled:
  - comments: 0.3.0
  - dav: 0.3.1
  - diagnostics: 0.1.0
  - enterprise_key: 0.1.3
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_antivirus: 0.11.1.0
  - files_external: 0.7.1
  - files_sharing: 0.10.1
  - files_texteditor: 2.2
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - gallery: 16.0.2
  - market: 0.2.1
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - updatenotification: 0.2.1
Disabled:
  - customgroups
  - firewall
  - multidirtest
  - password_policy
  - testing
  - theme-example

Are you using external storage, if yes which one: local/smb/sftp/...
local
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser:
FF 55
Operating system:
Debian

@SergioBertolinSG
Copy link
Contributor

I cannot reproduce with current master, group '0' is deleted correctly.

@SergioBertolinSG
Copy link
Contributor

group_zero

@individual-it
Copy link
Member Author

receiving a 302 and 405 response from server
image
image

note the successful delete in row 4 was of an other group

@individual-it
Copy link
Member Author

for me $(element).closest('li').data('gid') in https://github.com/owncloud/core/blob/master/settings/js/users/groups.js#L297 evaluates to "false" with a groups called "0" and so the whole function returns and empty string.
changing the line to return ($(element).closest('li').data('gid').toString() || ''); fixes the issue

@phil-davis
Copy link
Contributor

Also:

  1. make group "0"
  2. add a few users, put some (or none) of them in group "0"
  3. click on group "0"
    Expected: the members of group "0" are listed.
    Actual: all users are listed

@PVince81
Copy link
Contributor

don't use .data('gid') but .attr('data.gid')

The problem with .data() is that it automatically tries to detect the data type of the contents while .attr() always returns a string.

@PVince81 PVince81 added this to the development milestone Oct 10, 2017
@PVince81 PVince81 added the p3-medium Normal priority label Oct 10, 2017
@individual-it
Copy link
Member Author

fix in #29310

@individual-it
Copy link
Member Author

@SergioBertolinSG I think I know why you could not reproduce that problem. After creating a group in the UI you have to navigate to some other page and back, or you create the group by "./occ".
It worked before the fix also if you just create the group and delete it straight away.

@individual-it
Copy link
Member Author

backport in #29323

@lock
Copy link

lock bot commented Aug 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants