-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Fix share permission checkboxes enabled when permissions can not be set #21379
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
Fix share permission checkboxes enabled when permissions can not be set #21379
Conversation
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
A sharee can reshare a file and set the edit, create, delete and share permissions of the reshare only if the received share has edit, create, delete and share permissions, or if they were revoked in the received share after being set in the reshare. Therefore, the permission checkboxes in the share menu should be enabled only if the user can set them (otherwise trying to check them will lead to an error). Note that "sharePermissions" has all the permissions if the file is not a reshare but a file owned by the user. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
|
/backport to stable19 |
|
/backport to stable18 |
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.
🐘
but with so many tests... 🚀
Mind elaborating? Is the the one issue where the jQuery |
I am afraid that I do not know if the issue is the |
|
I your observation matches with my problem because of the way our legacy modules register themselves on the global variables. If one of the modules is not loaded when I dependent of it is executed, you'll get an error. |
|
So... to merge or not to merge? |
Merge, we were talking about why the acceptance tests for the Files app fail since the jQuery bump, but it does not affect the fix itself :-) |
Note that the acceptance tests will probably fail because the Files app is currently broken due to the jQuery update, but I run them locally with jQuery 2.1.4 and they passed.
How to test (scenario 1)
Result with this pull request
Can edit is unchecked and disabled.
Result without this pull request
Can edit is unchecked and enabled. Trying to check it triggers an error.
How to test (scenario 2)
Result with this pull request
Can edit is unchecked and disabled.
Result without this pull request
Can edit is unchecked, but still enabled. Trying to check it triggers an error.