Repository navigation
Conversation
There was a problem hiding this comment.
I'm not 100% sure if this will mess with being able to delete files inside the folder.
I think we handle that on storage layer (calculating delete/rename permissions taking the parent folder into account) but I'm not sure
There was a problem hiding this comment.
On master with the web UI it seems to work fine, I'm able to make changes in the external storage folder.
The permissions on the entries themselves seem to allow that.
b1bf955 to
38e25a6
Compare
Rebased. Unit tests still pending... |
38e25a6 to
697aef8
Compare
|
Added/fixed unit tests |
697aef8 to
0ce5cc8
Compare
|
Rebased onto non-broken commit from master. Added integration tests. Please review! |
0ce5cc8 to
2f2be3c
Compare
| public function getPermissions() { | ||
| $perms = $this->data['permissions']; | ||
| // if this is the mount point itself | ||
| if (empty($this->internalPath)) { |
There was a problem hiding this comment.
don't use empty on strings ('0')
There was a problem hiding this comment.
ouch... old code from before I learnt the lesson. Learnt again...
|
👍 otherwise |
2f2be3c to
979f407
Compare
|
👍 |
|
@PVince81 Integration tests fail :( |
|
Hmmm... I suspect that some logic changed. From the other unit tests it looks like we only added "DELETE" permissions on received shares. Now we add "UPDATE" + "DELETE" to match whatever is returned by the main PROPFIND. @rullzer do you see any potential issue with this regarding reshare permissions ? Or can I safely adjust the integration test ? |
|
|
Trouble ahead: for read-only file shares, the permissions are usually "SRDNVW" when viewed from the parent which makes it possible to rename and delete (unshare from self) the shared file. The direct permissions are "SRD", which account to the fact that the file is read-only. However on this PR this is normalized to "SRDNVW", always. So the information that this file is read-only is lost somehow... I haven't tested how the sync client reacts to this. The text editor however seems to have its own read-only check and doesn't rely on what the file list says. The weird part of this is that one might need to check This is all because we need the update + delete permissions to be able to move a received share file. |
|
Ai... I did not think of that. So regarding resharing. Well we depend on proper permissions returned by te Node API to check that. So if that now startes returning UPDATE permissions for RO shares then we will allow that. So we need to double check this.. |
|
Regarding the webdav permissions. I'm now also less certain. As this patch will make it basically impossible for RO file shares to be marked as RO on the clients. @PVince81 lets discuss this tomorrow... as this is the permissions mess all over again and we need to think how to properly solve it... (maybe some brainstorming with a whiteboard next week?) |
979f407 to
ab69fc1
Compare
|
Rebased. |
|
👍 looks good |
|
Thanks for the review. I think this needs careful retesting, also with federated shares, to make sure it doesn't introduce regressions. |
|
Also, potential issue: #20685 (comment) Not sure if recent changes to permission handling would help here |
@PVince81 is that still to-do? |
|
@PVince81 9.2 ? |
|
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. |
Whenever a mount point is retrieved through getFileInfo or a listing of
a directory, the permissions returned must be the same.
@icewind1991 is that what you meant in #20426 (comment) ?
Note: this only makes the permissions consistent.
CC @rullzer @MorrisJobke
TODO: