Skip initial permission check on setName method for shared mounts#38794
Skip initial permission check on setName method for shared mounts#38794JammingBen merged 6 commits intomasterfrom
Conversation
|
It seems that the check can be removed safely. This makes it possible to always rename a share regardless of its permissions. Not a 100% sure though, any opinions or thoughts @mrow4a ? Another thing to mention: we still have the same issue with mounted storages. The UI shows the "rename"-action for a storage, but renaming results in an error. @jvillafanez You've dealt with a similar issue lately if I remember correctly? Something related to WND? |
|
Yes. #38709 is just for SMB. WND has similar changes too. I don't know if we want to make similar changes for all the storages. |
|
Could we check instead if the node refers to a shared mount? Something like "if node is not a shared mount and not writable, then throw forbidden exception" It seems more reasonable than just removing the permission check. |
Depends on the solution I would say. According to Patrick, a mount point should always be allowed to be renamed. Your fix is heading in a different direction if I understood correctly, I assume because it was an easy fix for the problem? So that would be something for the future.
Good point, I updated the PR. @phil-davis How do we handle the acceptance test in https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementToRoot/moveReceivedShareOc10Issue30325.feature? Do we adjust it, or better remove entirely? |
Remove it, and search for The same sort of thing is here: https://github.com/owncloud/core/blob/master/tests/acceptance/features/webUIRenameFolders/renameFoldersOc10Issue30325.feature |
tests/acceptance/features/apiShareManagementToRoot/moveReceivedShare.feature
Show resolved
Hide resolved
phil-davis
left a comment
There was a problem hiding this comment.
Code and test changes LGTM
jvillafanez
left a comment
There was a problem hiding this comment.
Little detail. Code looks good anyway.
|
Kudos, SonarCloud Quality Gate passed! |
Description
Because renaming a mount should always be possible (see https://github.com/owncloud/enterprise/issues/4582#issuecomment-851328502).
Related Issue
Types of changes
Checklist: