Skip to content

fix: hide "open locally" button on public shares - #6214

Merged
elzody merged 2 commits into
mainfrom
fix/hide-open-locally-on-public-shares
Oct 20, 2026
Merged

elzody merged 2 commits into
mainfrom
fix/hide-open-locally-on-public-shares

Conversation

@elzody

@elzody elzody commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The "Open in local editor" button should not be offered when editing a document in the following scenarios:

  • Editing via a public share link
  • Editor is not a logged-in user (the editor is a guest)

The diff is mostly changes/additions to tests; the cy.waitForPostMessage() logic was made separate so that it can also be used in its new negative equivalent cy.shouldNotHavePostMessage(). This was the only surefire way to verify the button is never inserted; it's not feasible to check for the DOM element specifically because the insertion causes Collabora to rebuild the entire notebook bar. This means the test would actually pass even though the button is still there in the end because the test is being run against the initial notebook bar that doesn't yet contain the button.

Aside from tests, the actual change is very minimal.

The changes in this PR are AI-assisted.

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

Tests to make sure the Insert_Button post message is not emitted in the
following cases:

	- The document is being edited via a public share
	- There is no logged-in user (editor is a guest)

The specific button in question is the "Open locally" button

Assisted-by: ClaudeCode:claude-opus-5[1m]
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
@elzody elzody self-assigned this Oct 20, 2026
@elzody elzody added the 3. to review Ready to be reviewed label Oct 20, 2026
@elzody
elzody requested a review from juliusknorr as a code owner October 20, 2026 18:24

@AndyScherzinger AndyScherzinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🐘

Comment thread src/view/Office.vue Resolved

@juliusknorr juliusknorr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nitpick, but good to get in 👍

Hides the "Open in local editor" button if editing a document via a
public share or if the editor is not logged-in (guest user).

Assisted-by: ClaudeCode:claude-opus-5[1m]
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
@elzody
elzody force-pushed the fix/hide-open-locally-on-public-shares branch from d5cd44c to 2b0f6ef Compare October 20, 2026 19:24
@elzody

elzody commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable35

@elzody

elzody commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable34 please

@elzody

elzody commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable33 please

@elzody
elzody merged commit f1d4ed7 into main Oct 20, 2026
38 checks passed
@elzody
elzody deleted the fix/hide-open-locally-on-public-shares branch October 20, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hide "Open in local editor" on public shares and for guests

3 participants