Skip to content

Renaming of customgroups using web ui is not possible. #87

Closed
owncloud/core
#28767

Description

@SergioBertolinSG

Steps to reproduce

  1. As admin user, create a custom group 'customgroup'.
  2. As admin user, using the frontend rename 'customgroup' to 'renamedgroup'.

Expected behaviour

Customgroup is renamed.

Actual behaviour

It fails to rename the customgroup.

Server configuration

Operating system:
Ubuntu 16.04

Web server:
Apache

Database:
MySQL

PHP version:
7.0

ownCloud version: (see ownCloud admin page)
10.0.3beta1
{"installed":"true","maintenance":"false","needsDbUpgrade":"false","version":"10.0.3.0","versionstring":"10.0.3 beta","edition":"Community","productname":"ownCloud"}

Updated from an older ownCloud or fresh install:
Fresh

The content of config/config.php:


Are you using external storage, if yes which one: local/smb/sftp/...
No.

Are you using encryption:
No.

Logs

{"reqId":"cTxBi29Px0i4qvbOsG0n","level":4,"time":"2017-08-22T08:24:51+00:00","remoteAddr":"HIDDEN_IP","user":"admin","app":"webdav","method":"MKCOL","url":"\/remote.php\/dav\/customgroups\/groups\/soyprivado2","message":"Exception: {\"Message\":\"HTTP\\\/1.1 409 Group with display name \\\"soyprivado\\\" already exists\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\Conflict\",\"Code\":0,\"Trace\":\"#0 \\\/opt\\\/owncloud\\\/apps\\\/customgroups\\\/lib\\\/Dav\\\/GroupsCollection.php(124): OCA\\\\CustomGroups\\\\Dav\\\\GroupsCollection->createGroup('soyprivado2', 'soyprivado')\\n#1 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1196): OCA\\\\CustomGroups\\\\Dav\\\\GroupsCollection->createExtendedCollection('soyprivado2', Object(Sabre\\\\DAV\\\\MkCol))\\n#2 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(590): Sabre\\\\DAV\\\\Server->createCollection('customgroups\\\/gr...', Object(Sabre\\\\DAV\\\\MkCol))\\n#3 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpMkcol(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#5 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:MKCOL', Array)\\n#6 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#7 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Server.php(234): Sabre\\\\DAV\\\\Server->exec()\\n#8 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#9 \\\/opt\\\/owncloud\\\/remote.php(165): require_once('\\\/opt\\\/owncloud\\\/a...')\\n#10 {main}\",\"File\":\"\\\/opt\\\/owncloud\\\/apps\\\/customgroups\\\/lib\\\/Dav\\\/GroupsCollection.php\",\"Line\":135,\"User\":\"admin\"}"}

Client configuration

Browser
Chrome

cc @PVince81

Activity

  1. added this to the milestone on Aug 22, 2017
  2. PVince81 commented on Aug 22, 2017

    @PVince81
    Contributor

    Weird, it worked last time when I tested the last change

  3. PVince81 commented on Aug 22, 2017

    @PVince81
    Contributor

    What ?!

    <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:oc="http://owncloud.org/ns">
    <d:response>
    <d:href>/owncloud/remote.php/dav/customgroups/groups/abc</d:href>
    <d:propstat>
    <d:prop/>
    <d:status>HTTP/1.1 418 I'm a teapot</d:status>
    </d:propstat>
    </d:response>
    </d:multistatus>
  4. PVince81 commented on Aug 22, 2017

    @PVince81
    Contributor

    Fix is here in core: owncloud/core#28767.

    This is because we use the option "wait" to delay setting the property until after the request finished. But this option wasn't properly supported in core.

  5. self-assigned this
    on Aug 22, 2017
  6. SergioBertolinSG commented on Aug 24, 2017

    @SergioBertolinSG
    ContributorAuthor

    There is a side effect of this fix. When adding new members to a renamed group it shows warning messages saying that the user is already a member of that group. (which is false).

    Steps to reproduce:

    1. Create a custom group called 'group1'.
    2. Rename 'group1' using UI to 'renamed_group1'.
    3. Add new members to 'renamed_group1'.

    Logs:

    {"reqId":"xjbC7cjSioyDXP0JGv8K","level":4,"time":"2017-08-24T07:26:00+00:00","remoteAddr":"HIDDEN","user":"admin","app":"webdav","method":"PUT","url":"\/remote.php\/dav\/customgroups\/groups\/group1\/dany","message":"Exception: {\"Message\":\"HTTP\\\/1.1 409 PUT is not allowed on non-files.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\Conflict\",\"Code\":0,\"Trace\":\"#0 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#2 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#3 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Server.php(234): Sabre\\\\DAV\\\\Server->exec()\\n#5 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#6 \\\/opt\\\/owncloud\\\/remote.php(175): require_once('\\\/opt\\\/owncloud\\\/a...')\\n#7 {main}\",\"File\":\"\\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php\",\"Line\":511,\"User\":\"admin\"}"}
    
    

    Tested using core master.

  7. PVince81 commented on Aug 24, 2017

    @PVince81
    Contributor

    Seems to be a refresh issue. If you switch to another group then back to the rename group, actions work.

    I'll see what I can do about it.

  8. PVince81 commented on Aug 24, 2017

    @PVince81
    Contributor

    Not related to the core change.

    There's a bug in the members panel. Apparently after a rename the "add member after select" event is triggered twice. So the member is added, but the second event causes the "already exists" error.

    Looking into it. Probably an event handler getting re-registered after rename.

  9. PVince81 commented on Aug 24, 2017

    @PVince81
    Contributor

    @SergioBertolinSG please retest with #95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions