Skip to content
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

Hide new public link share button if user lacks permissions #5126

Merged
merged 1 commit into from
May 27, 2021

Conversation

pascalwengerter
Copy link
Contributor

Description

Hides "Create public link" button if user has insufficient share permissions. Debatable if we should only hide the "Create" button and if users with e.g. view/edit rights should be at least displayed links (even if they can't edit/create/delete them)

Related Issue

Copy link
Collaborator

@fschade fschade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@pascalwengerter pascalwengerter force-pushed the 19052021_hide-public-links-cantShare branch from 5701b4a to e5b3b10 Compare May 20, 2021 10:02
@kulmann
Copy link
Member

kulmann commented May 20, 2021

@pascalwengerter What do you think about disabling the button instead, when the user doesn't have share permissions?

@pascalwengerter
Copy link
Contributor Author

@pascalwengerter What do you think about disabling the button instead, when the user doesn't have share permissions?

No clear preference since we'll be updating this component soon anyways, let me know if I should update this to disable the button!

Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right that we're changing it anyway. But could you do the same approach as in the FileSharingSidebar.vue component? That one has a noResharePermsMessage computed prop which is displayed instead of the button when resharing is not allowed.

@pascalwengerter
Copy link
Contributor Author

You're right that we're changing it anyway. But could you do the same approach as in the FileSharingSidebar.vue component? That one has a noResharePermsMessage computed prop which is displayed instead of the button when resharing is not allowed.

Good idea. I'll however pause this PR in favor of the swarming branch since both touch the FileLinkSidebar.vue and I want to avoid merge conflics 🥴

@pascalwengerter
Copy link
Contributor Author

You're right that we're changing it anyway. But could you do the same approach as in the FileSharingSidebar.vue component? That one has a noResharePermsMessage computed prop which is displayed instead of the button when resharing is not allowed.

Good idea. I'll however pause this PR in favor of the swarming branch since both touch the FileLinkSidebar.vue and I want to avoid merge conflics 🥴

We'll rebase this one to a11y-swarming and change the merge target to avoid conflicts and have this upstream soon anyways, discussed it with @fschade

@pascalwengerter pascalwengerter changed the base branch from master to a11y-swarming May 26, 2021 08:17
@pascalwengerter pascalwengerter force-pushed the 19052021_hide-public-links-cantShare branch from e5b3b10 to 60afb29 Compare May 26, 2021 08:40
@pascalwengerter pascalwengerter force-pushed the a11y-swarming branch 2 times, most recently from 7e9d086 to cd7db04 Compare May 26, 2021 11:07
@pascalwengerter pascalwengerter force-pushed the 19052021_hide-public-links-cantShare branch from 60afb29 to 0e85f39 Compare May 26, 2021 16:33
@ownclouders
Copy link
Contributor

💥 Acceptance tests webUINotificationBasic failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUINotifications-displayNotificationsOnWebUI-feature-18.png

webUINotifications-displayNotificationsOnWebUI-feature-18.png

@ownclouders
Copy link
Contributor

💥 Visual regression tests webUIOCISFiles3 failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

Diff Image:

topBar.png
Actual Image:

topBar.png
Comparing Against:

topBar.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests TrashbinDelete failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUITrashbinDelete-trashbinDelete-feature-113.png

webUITrashbinDelete-trashbinDelete-feature-113.png

webUITrashbinDelete-trashbinDelete-feature-29.png

webUITrashbinDelete-trashbinDelete-feature-29.png

webUITrashbinDelete-trashbinDelete-feature-42.png

webUITrashbinDelete-trashbinDelete-feature-42.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests MarkdownEditor failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUIMarkdownEditor-markdownFile-feature-62.png

webUIMarkdownEditor-markdownFile-feature-62.png

webUIMarkdownEditor-markdownFile-feature-63.png

webUIMarkdownEditor-markdownFile-feature-63.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests TrashbinFilesFolders failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUITrashbinFilesFolders-trashbinFilesFolders-feature-23.png

webUITrashbinFilesFolders-trashbinFilesFolders-feature-23.png

webUITrashbinFilesFolders-trashbinFilesFolders-feature-38.png

webUITrashbinFilesFolders-trashbinFilesFolders-feature-38.png

webUITrashbinFilesFolders-trashbinFilesFolders-feature-82.png

webUITrashbinFilesFolders-trashbinFilesFolders-feature-82.png

webUITrashbinFilesFolders-trashbinFilesFolders-feature-97.png

webUITrashbinFilesFolders-trashbinFilesFolders-feature-97.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests SharingPublicDifferentRoles failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUISharingPublicDifferentRoles-shareByPublicLinkDifferentRoles-feature-114.png

webUISharingPublicDifferentRoles-shareByPublicLinkDifferentRoles-feature-114.png

webUISharingPublicDifferentRoles-shareByPublicLinkDifferentRoles-feature-93.png

webUISharingPublicDifferentRoles-shareByPublicLinkDifferentRoles-feature-93.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests SharingPublicExpire failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUISharingPublicExpire-shareByPublicLinkExpiringLinks-feature-106.png

webUISharingPublicExpire-shareByPublicLinkExpiringLinks-feature-106.png

webUISharingPublicExpire-shareByPublicLinkExpiringLinks-feature-11.png

webUISharingPublicExpire-shareByPublicLinkExpiringLinks-feature-11.png

webUISharingPublicExpire-shareByPublicLinkExpiringLinks-feature-147.png

webUISharingPublicExpire-shareByPublicLinkExpiringLinks-feature-147.png

webUISharingPublicExpire-shareByPublicLinkExpiringLinks-feature-24.png

webUISharingPublicExpire-shareByPublicLinkExpiringLinks-feature-24.png

webUISharingPublicExpire-shareByPublicLinkExpiringLinks-feature-86.png

webUISharingPublicExpire-shareByPublicLinkExpiringLinks-feature-86.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests oc10-integration-notifications failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUISharingNotifications-shareWithUsers-feature-21.png

webUISharingNotifications-shareWithUsers-feature-21.png

webUISharingNotifications-shareWithUsers-feature-32.png

webUISharingNotifications-shareWithUsers-feature-32.png

webUISharingNotifications-shareWithUsers-feature-40.png

webUISharingNotifications-shareWithUsers-feature-40.png

webUISharingNotifications-shareWithUsers-feature-53.png

webUISharingNotifications-shareWithUsers-feature-53.png

webUISharingNotificationsToRoot-shareWithUsers-feature-19.png

webUISharingNotificationsToRoot-shareWithUsers-feature-19.png

webUISharingNotificationsToRoot-shareWithUsers-feature-31.png

webUISharingNotificationsToRoot-shareWithUsers-feature-31.png

webUISharingNotificationsToRoot-shareWithUsers-feature-40.png

webUISharingNotificationsToRoot-shareWithUsers-feature-40.png

webUISharingNotificationsToRoot-shareWithUsers-feature-53.png

webUISharingNotificationsToRoot-shareWithUsers-feature-53.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests TrashbinRestore failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUITrashbinRestore-trashbinRestore-feature-138.png

webUITrashbinRestore-trashbinRestore-feature-138.png

webUITrashbinRestore-trashbinRestore-feature-14.png

webUITrashbinRestore-trashbinRestore-feature-14.png

webUITrashbinRestore-trashbinRestore-feature-181.png

webUITrashbinRestore-trashbinRestore-feature-181.png

webUITrashbinRestore-trashbinRestore-feature-222.png

webUITrashbinRestore-trashbinRestore-feature-222.png

webUITrashbinRestore-trashbinRestore-feature-241.png

webUITrashbinRestore-trashbinRestore-feature-241.png

webUITrashbinRestore-trashbinRestore-feature-260.png

webUITrashbinRestore-trashbinRestore-feature-260.png

webUITrashbinRestore-trashbinRestore-feature-30.png

webUITrashbinRestore-trashbinRestore-feature-30.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests Upload failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUIUpload-upload-feature-130.png

webUIUpload-upload-feature-130.png

webUIUpload-upload-feature-151.png

webUIUpload-upload-feature-151.png

webUIUpload-upload-feature-89.png

webUIUpload-upload-feature-89.png

webUIUpload-upload-feature-98.png

webUIUpload-upload-feature-98.png

webUIUpload-uploadEdgecases-feature-109.png

webUIUpload-uploadEdgecases-feature-109.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests ResharingToRoot failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUIResharingToRoot-reshareUsers-feature-227.png

webUIResharingToRoot-reshareUsers-feature-227.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests SharingInternalUsersExpire failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUISharingInternalUsersExpire-shareWithUsersExpiringShares-feature-104.png

webUISharingInternalUsersExpire-shareWithUsersExpiringShares-feature-104.png

webUISharingInternalUsersExpire-shareWithUsersExpiringShares-feature-105.png

webUISharingInternalUsersExpire-shareWithUsersExpiringShares-feature-105.png

webUISharingInternalUsersExpire-shareWithUsersExpiringShares-feature-108.png

webUISharingInternalUsersExpire-shareWithUsersExpiringShares-feature-108.png

webUISharingInternalUsersExpire-shareWithUsersExpiringShares-feature-134.png

webUISharingInternalUsersExpire-shareWithUsersExpiringShares-feature-134.png

webUISharingInternalUsersExpire-shareWithUsersExpiringShares-feature-211.png

webUISharingInternalUsersExpire-shareWithUsersExpiringShares-feature-211.png

webUISharingInternalUsersExpire-shareWithUsersExpiringShares-feature-240.png

webUISharingInternalUsersExpire-shareWithUsersExpiringShares-feature-240.png

webUISharingInternalUsersExpire-shareWithUsersExpiringShares-feature-34.png

webUISharingInternalUsersExpire-shareWithUsersExpiringShares-feature-34.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests SharingInternalUsersExpireToRoot failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUISharingInternalUsersExpireToRoot-shareWithUsersExpiringShares-feature-100.png

webUISharingInternalUsersExpireToRoot-shareWithUsersExpiringShares-feature-100.png

webUISharingInternalUsersExpireToRoot-shareWithUsersExpiringShares-feature-126.png

webUISharingInternalUsersExpireToRoot-shareWithUsersExpiringShares-feature-126.png

webUISharingInternalUsersExpireToRoot-shareWithUsersExpiringShares-feature-203.png

webUISharingInternalUsersExpireToRoot-shareWithUsersExpiringShares-feature-203.png

webUISharingInternalUsersExpireToRoot-shareWithUsersExpiringShares-feature-232.png

webUISharingInternalUsersExpireToRoot-shareWithUsersExpiringShares-feature-232.png

webUISharingInternalUsersExpireToRoot-shareWithUsersExpiringShares-feature-30.png

webUISharingInternalUsersExpireToRoot-shareWithUsersExpiringShares-feature-30.png

webUISharingInternalUsersExpireToRoot-shareWithUsersExpiringShares-feature-96.png

webUISharingInternalUsersExpireToRoot-shareWithUsersExpiringShares-feature-96.png

webUISharingInternalUsersExpireToRoot-shareWithUsersExpiringShares-feature-97.png

webUISharingInternalUsersExpireToRoot-shareWithUsersExpiringShares-feature-97.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests SharingPublicManagement failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUISharingPublicManagement-publicLinkIndicator-feature-110.png

webUISharingPublicManagement-publicLinkIndicator-feature-110.png

webUISharingPublicManagement-shareByPublicLink-feature-102.png

webUISharingPublicManagement-shareByPublicLink-feature-102.png

webUISharingPublicManagement-shareByPublicLink-feature-12.png

webUISharingPublicManagement-shareByPublicLink-feature-12.png

webUISharingPublicManagement-shareByPublicLink-feature-146.png

webUISharingPublicManagement-shareByPublicLink-feature-146.png

webUISharingPublicManagement-shareByPublicLink-feature-201.png

webUISharingPublicManagement-shareByPublicLink-feature-201.png

webUISharingPublicManagement-shareByPublicLink-feature-64.png

webUISharingPublicManagement-shareByPublicLink-feature-64.png

webUISharingPublicManagement-shareByPublicLink-feature-90.png

webUISharingPublicManagement-shareByPublicLink-feature-90.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests webUIResharing failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUIResharing1-reshareUsers-feature-230.png

webUIResharing1-reshareUsers-feature-230.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests webUISharingNotifications failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUISharingNotifications-shareWithGroups-feature-24.png

webUISharingNotifications-shareWithGroups-feature-24.png

webUISharingNotifications-shareWithUsers-feature-21.png

webUISharingNotifications-shareWithUsers-feature-21.png

webUISharingNotifications-shareWithUsers-feature-32.png

webUISharingNotifications-shareWithUsers-feature-32.png

webUISharingNotifications-shareWithUsers-feature-40.png

webUISharingNotifications-shareWithUsers-feature-40.png

webUISharingNotifications-shareWithUsers-feature-53.png

webUISharingNotifications-shareWithUsers-feature-53.png

webUISharingNotificationsToRoot-shareWithGroups-feature-24.png

webUISharingNotificationsToRoot-shareWithGroups-feature-24.png

webUISharingNotificationsToRoot-shareWithUsers-feature-19.png

webUISharingNotificationsToRoot-shareWithUsers-feature-19.png

webUISharingNotificationsToRoot-shareWithUsers-feature-31.png

webUISharingNotificationsToRoot-shareWithUsers-feature-31.png

webUISharingNotificationsToRoot-shareWithUsers-feature-40.png

webUISharingNotificationsToRoot-shareWithUsers-feature-40.png

webUISharingNotificationsToRoot-shareWithUsers-feature-53.png

webUISharingNotificationsToRoot-shareWithUsers-feature-53.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests webUISharingInternalUsersRoot2 failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUISharingInternalUsersToRootCollaborator-shareWithUsers-feature-109.png

webUISharingInternalUsersToRootCollaborator-shareWithUsers-feature-109.png

webUISharingInternalUsersToRootShareWithPage-shareWithUsers-feature-26.png

webUISharingInternalUsersToRootShareWithPage-shareWithUsers-feature-26.png

webUISharingInternalUsersToRootShareWithPage-shareWithUsers-feature-52.png

webUISharingInternalUsersToRootShareWithPage-shareWithUsers-feature-52.png

webUISharingInternalUsersToRootShareWithPage-shareWithUsers-feature-61.png

webUISharingInternalUsersToRootShareWithPage-shareWithUsers-feature-61.png

webUISharingInternalUsersToRootShareWithPage-shareWithUsers-feature-70.png

webUISharingInternalUsersToRootShareWithPage-shareWithUsers-feature-70.png

webUISharingInternalUsersToRootShareWithPage-shareWithUsers-feature-79.png

webUISharingInternalUsersToRootShareWithPage-shareWithUsers-feature-79.png

webUISharingInternalUsersToRootShareWithPage-shareWithUsers-feature-96.png

webUISharingInternalUsersToRootShareWithPage-shareWithUsers-feature-96.png

@ownclouders
Copy link
Contributor

💥 Acceptance tests webUISharingInternalUsersRoot1 failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/15729/

webUISharingInternalUsersToRoot-shareWithUsers-feature-103.png

webUISharingInternalUsersToRoot-shareWithUsers-feature-103.png

webUISharingInternalUsersToRoot-shareWithUsers-feature-275.png

webUISharingInternalUsersToRoot-shareWithUsers-feature-275.png

webUISharingInternalUsersToRoot-shareWithUsers-feature-57.png

webUISharingInternalUsersToRoot-shareWithUsers-feature-57.png

webUISharingInternalUsersToRoot-shareWithUsers-feature-74.png

webUISharingInternalUsersToRoot-shareWithUsers-feature-74.png

Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@kulmann kulmann merged commit d007fef into a11y-swarming May 27, 2021
@delete-merged-branch delete-merged-branch bot deleted the 19052021_hide-public-links-cantShare branch May 27, 2021 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sharing permission not respected consistently
4 participants