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

Cannot add custom properties to a propFind for allprops #482

Closed
ghost opened this issue Jul 21, 2014 · 3 comments
Closed

Cannot add custom properties to a propFind for allprops #482

ghost opened this issue Jul 21, 2014 · 3 comments

Comments

@ghost
Copy link

ghost commented Jul 21, 2014

Encountered when converting the SambaDAV plugin to use the SabreDAV-2.0.4 propFind and propPatch events. SabreDAV has a fixed list of properties that it will return for an "allprops" request. Fair enough. But if we add a propFind plugin that calls 'set' for a nonstandard property x, I expect property x to be hard added to the response. Instead, SabreDAV decides that property x is not in the pre-approved list, and silently drops it.

Background: in SambaDAV we always add the nonstandard {DAV:}ishidden, {DAV:}isreadonly and Win32 flag properties during a propfind, to support mounting as a Windows Network Share. I expected this (demo) code to set the property:

class MSPropertiesPlugin extends DAV\ServerPlugin
{
    public function initialize (DAV\Server $server)
    {
        $server->on('propFind', [ $this, 'propFind' ]);
    }
    public function propFind (DAV\PropFind $propFind, DAV\INode $node)
    {
        // Hide all the things!
        $propFind->set('{DAV:}ishidden', '1');
    }
}

Instead the property is ignored (unless we add it to SabreDAV's "allprops" list by hand).

@ghost
Copy link
Author

ghost commented Jul 21, 2014

NB, see also Issue #352. The afterGetProperties workaround no longer works in 2.0+.

@evert
Copy link
Member

evert commented Jul 21, 2014

Treating this as a regression. i agree that there should be a way to do this.

evert added a commit that referenced this issue Jul 27, 2014
Issue #482: PropFind::set() hard adds properties during ALLPROPS
@ghost
Copy link
Author

ghost commented Jul 28, 2014

Fixed in SabreDAV 2.1.x.

@ghost ghost closed this as completed Jul 28, 2014
n-peugnet added a commit to n-peugnet/dav that referenced this issue May 14, 2021
When custom properties are manually added in a plugin with the `propFind` event like in this example: sabre-io#482 and depth >= 1, the subnodes' propfind's type was incorrectly deducted.
This resulted in custom properties only added to the first node and not on the subnodes.
n-peugnet added a commit to n-peugnet/dav that referenced this issue Nov 2, 2021
When custom properties are manually added in a plugin with the `propFind` event like in this example: sabre-io#482 and depth >= 1, the subnodes' propfind's type was incorrectly deducted.
This resulted in custom properties only added to the first node and not on the subnodes.
n-peugnet added a commit to n-peugnet/dav that referenced this issue Nov 3, 2021
When custom properties are manually added in a plugin with the `propFind` event like in this example: sabre-io#482 and depth >= 1, the subnodes' propfind's type was incorrectly deducted.
This resulted in custom properties only added to the first node and not on the subnodes.
phil-davis pushed a commit to n-peugnet/dav that referenced this issue Nov 16, 2021
When custom properties are manually added in a plugin with the `propFind` event like in this example: sabre-io#482 and depth >= 1, the subnodes' propfind's type was incorrectly deducted.
This resulted in custom properties only added to the first node and not on the subnodes.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant