-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add sharePermissions webdav property #22834
Conversation
By analyzing the blame information on this pull request, we identified @PVince81, @DeepDiver1975 and @icewind1991 to be potential reviewers |
Or course we could also just use the CRUDS permission letters |
I can't see a reshare permission, but maybe I miss something. |
return ''; | ||
} | ||
|
||
$p .= 'R'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@schiesbn reshare permission is right there... basically we return an empty string if we do not have reshare permissions... because if you don't have share permissions you also can't share RW etc.
Makes sense, but I wonder if we should just return the permission as integer instead of using these archaic letters. Once again I forgot why we got those in the first place... |
@PVince81 well that is fine with me of course. I just reused the letters. But we can use CRUDS letters. Or just the permissions. Permissions might even be cleaner. Let me change the PR. |
The problem with the letters is that you need weird magic to convert them back into the integer. |
53d1a56
to
e80337f
Compare
@owncloud/desktop-developers @owncloud/android-developers @owncloud/ios-developers This PR will add a property The Any objections to that? |
e80337f
to
c6d355d
Compare
Ok lets go with the integer then. Rebased and squashed. |
Please review: @PVince81 @DeepDiver1975 @schiesbn |
@DeepDiver1975 @karlitschek I think backporthing this makes sense. It will allow our clients to properly show share info for a file/folder that has been shared with them. Since our clients are doing more and more with sharing I would say this is a feature that is very welcome. But your call. |
Should have an integration test or something like that, to make sure the API doesnt break |
Yes working on those :) |
makes sense. 👍 but not a critical bugfix so no backport 👎 |
Ok no backport got it :) Anyway ready for review so I can instruct all our clients to start implenting this already ;) |
@@ -45,6 +45,7 @@ class FilesPlugin extends \Sabre\DAV\ServerPlugin { | |||
const FILEID_PROPERTYNAME = '{http://owncloud.org/ns}id'; | |||
const INTERNAL_FILEID_PROPERTYNAME = '{http://owncloud.org/ns}fileid'; | |||
const PERMISSIONS_PROPERTYNAME = '{http://owncloud.org/ns}permissions'; | |||
const SHARE_PERMISSIONS_PROPERTYNAME = '{http://owncloud.org/ns}sharePermissions'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make this "share-permissions"
👎 please adjust property name |
This property can be queries by the clients so they know the max permissions they can use to share a file with. This will improve the UX. The oc:permissions proptery is not enough since mountpoints have different permissions (delete + move by default). By making it a new property the clients can just request it. On older servers it will just return a 404 for that property (and thus they know they have to fall back to their hacky work arounds). But if the property is returned the client can show proper info. * unit tests * intergration test
fb9eb9a
to
5334bcc
Compare
Fixed the external mountpoint permissions. |
@PVince81 property renamed. |
👍 |
@@ -45,6 +45,7 @@ class FilesPlugin extends \Sabre\DAV\ServerPlugin { | |||
const FILEID_PROPERTYNAME = '{http://owncloud.org/ns}id'; | |||
const INTERNAL_FILEID_PROPERTYNAME = '{http://owncloud.org/ns}fileid'; | |||
const PERMISSIONS_PROPERTYNAME = '{http://owncloud.org/ns}permissions'; | |||
const SHARE_PERMISSIONS_PROPERTYNAME = '{http://owncloud.org/ns}share-permissions'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw @DeepDiver1975 always replaces configs with the real strings in his patches all the time. maybe we should have a decision whats the way to go and then all use the same way? 😉
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. |
This property can be queries by the clients so they know the max
permissions they can use to share a file with. This will improve the UX.
The oc:permissions proptery is not enough since mountpoints have
different permissions (delete + move by default).
By making it a new property the clients can just request it. On older
servers it will just return a 404 for that property (and thus they know
they have to fall back to their hacky work arounds). But if the property
is returned the client can show proper info.
CC: @PVince81 @DeepDiver1975 @nickvergessen @MorrisJobke @LukasReschke @schiesbn