-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[stable27] fix: Keep download action for files and hide only for relevant files #45344
Conversation
delete fileActions.actions.all.Comment | ||
delete fileActions.actions.all.Details | ||
delete fileActions.actions.all.Goto |
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.
This seems already done with the permissions checks on the individual actions
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.
The change make sense, but I am wondering whether the issue was always there or if it was introduced by a recent change.
/compile |
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.
Changes look okay.
Two questions:
- How to reproduce this bug?
- Only nc27 affected?
Sorry should have mentioned that in the description:
Yes, seems fine with 28+ due to the files2vue migration. |
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.
Sorry, this needs a little adjustment, so this works correctly on the main file listing page but then on the "Shares" tab the "Download" option still appears. Granted the user cannot download the file but it should not appear at all there.
I tried but wasn't able to come up with a proper fix for this before going on vacation. It seems we're lacking to expose the share attributes that are used to check if the button should be hidden when constructing the objects for the shared file listing. @artonge Maybe @Fenn-CS or someone else from the files team can take over this one to get into the second RC? |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
bba6363
to
3c7a526
Compare
Signed-off-by: Christopher Ng <chrng8@gmail.com>
3c7a526
to
b6988c7
Compare
Deleting the file actions if permissions do not apply causes them to generally disappear as the list of file actions to show is built once the user clicks the action menu, not when the file list row is rendered.
This PR will adapt the already existing shouldShow callback that is used for inline actions to regular ones so that we can check at time of displaying the menu with the context of the current file and hide it accordingly.