Skip to content

if user can't save element, show the element editor as static#16205

Merged
brandonkelly merged 3 commits into5.xfrom
bugfix/element-editor-slideout-static-adjustment
Nov 27, 2024
Merged

if user can't save element, show the element editor as static#16205
brandonkelly merged 3 commits into5.xfrom
bugfix/element-editor-slideout-static-adjustment

Conversation

@i-just
Copy link
Copy Markdown
Contributor

@i-just i-just commented Nov 25, 2024

Description

If a user has permission to view other users’ entries (but not save them), if you open such entries in a slideout, the cancel and save buttons will show. Clicking the save button triggers an internal server error notification and the entry is not saved (rightly so).

This PR checks if the user can save an element, and, if not, sets the isStatic property to true so that the element editor slideout can show the correct button(s) in the footer.

Before:
Screenshot 2024-11-25 at 13 05 43

After:
Screenshot 2024-11-25 at 13 05 27

Related issues

n/a

@i-just i-just requested a review from brandonkelly November 25, 2024 13:10
@brandonkelly brandonkelly merged commit 85c53a1 into 5.x Nov 27, 2024
@brandonkelly brandonkelly deleted the bugfix/element-editor-slideout-static-adjustment branch November 27, 2024 21:05
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.

2 participants