Skip to content

Disable/hide share edit options when user can not edit the share - #49747

Merged
skjnldsv merged 3 commits into
masterfrom
fix/files_sharing/disable-editing
Dec 10, 2024
Merged

Disable/hide share edit options when user can not edit the share#49747
skjnldsv merged 3 commits into
masterfrom
fix/files_sharing/disable-editing

Conversation

@provokateurin

@provokateurinprovokateurin commented Dec 10, 2024

Copy link
Copy Markdown
Member

Summary

We were still showing the user the options to edit and delete the share, but they will face an unhelpful error message when they try to continue.

Before:
image

After:
image

We could also hide the quick edit button, but I think it's nice to leave it there to still indicate the permission of the share, even if the current user can not change them.

Checklist

@provokateurinprovokateurin added bug 3. to review Waiting for reviews labels Dec 10, 2024
@provokateurinprovokateurin added this to the Nextcloud 31 milestone Dec 10, 2024
@provokateurin
provokateurin requested review from a team, Pytal, artonge and sorbaugh and removed request for a teamDecember 10, 2024 09:27
@provokateurinprovokateurin changed the title fix(SharingEntry): Hide edit button if user can not edit shareDisable/hide share edit options when user can not edit the shareDec 10, 2024
@provokateurin

Copy link
Copy Markdown
MemberAuthor

/backport to stable30

@provokateurin

Copy link
Copy Markdown
MemberAuthor

/backport to stable29

@provokateurin

Copy link
Copy Markdown
MemberAuthor

/backport to stable28

@provokateurin

Copy link
Copy Markdown
MemberAuthor

/backport to stable27

@nfebenfebe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@provokateurin

Copy link
Copy Markdown
MemberAuthor

/compile

provokateurinand others added 3 commits December 10, 2024 18:47
Signed-off-by: provokateurin <kate@provokateurin.de>
… can not edit share
Signed-off-by: provokateurin <kate@provokateurin.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@skjnldsv
skjnldsvforce-pushed the fix/files_sharing/disable-editing branch from e9e6af8 to 3a64092CompareDecember 10, 2024 17:47
@skjnldsv
skjnldsv disabled auto-merge December 10, 2024 17:47
@skjnldsv
skjnldsv merged commit db5be3d into masterDec 10, 2024
@skjnldsv
skjnldsv deleted the fix/files_sharing/disable-editing branch December 10, 2024 19:07
@backportbot

Copy link
Copy Markdown

The backport to stable27 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable27
git pull origin stable27
# Create the new backport branch
git checkout -b backport/49747/stable27
# Cherry pick the change from the commit sha1 of the change against the default branch# This might cause conflicts, resolve them
git cherry-pick 1e44c671 f2898df2 3a640929
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/49747/stable27

Error: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@skjnldsv

Copy link
Copy Markdown
Member

/backport to stable30

@skjnldsv

Copy link
Copy Markdown
Member

/backport to stable28

@backportbot

Copy link
Copy Markdown

The backport to stable30 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable30
git pull origin stable30
# Create the new backport branch
git checkout -b backport/49747/stable30
# Cherry pick the change from the commit sha1 of the change against the default branch# This might cause conflicts, resolve them
git cherry-pick 1e44c671 f2898df2 3a640929
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/49747/stable30

Error: Failed to create pull request: Validation Failed: {"resource":"PullRequest","code":"custom","message":"A pull request already exists for nextcloud:backport/49747/stable30."}


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot

Copy link
Copy Markdown

The backport to stable28 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable28
git pull origin stable28
# Create the new backport branch
git checkout -b backport/49747/stable28
# Cherry pick the change from the commit sha1 of the change against the default branch# This might cause conflicts, resolve them
git cherry-pick 1e44c671 f2898df2 3a640929
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/49747/stable28

Error: Failed to create pull request: Validation Failed: {"resource":"PullRequest","code":"custom","message":"A pull request already exists for nextcloud:backport/49747/stable28."}


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@skjnldsvskjnldsv mentioned this pull request Jan 7, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@provokateurin@skjnldsv@artonge@nfebe@nextcloud-command