Skip to content

chore!: remove Allow Anonymous Write setting and anonymous role - #41828

Draft
KevLehman wants to merge 6 commits into
release-9.0.0from
chore/remove-allow-anonymous-write
Draft

chore!: remove Allow Anonymous Write setting and anonymous role#41828
KevLehman wants to merge 6 commits into
release-9.0.0from
chore/remove-allow-anonymous-write

Conversation

@KevLehman

@KevLehman KevLehman commented Aug 18, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Follow-up to CORE-1514 (deprecation note). Removes the "Allow Anonymous Write" feature entirely:

  • Accounts_AllowAnonymousWrite setting and its deprecation alert
  • "Or talk as anonymous" composer action (ComposerAnonymous now only offers sign in)
  • anonymous branch of the registerUser method (no more user creation without email); method signature narrowed on server and @rocket.chat/ui-client types
  • anonymous role: dropped from default permissions, role seeding and role priority order; runAfterVerifyEmail / deprecated afterVerifyEmail method removed (their only job was promoting anonymous users)
  • related i18n keys across all locales, e2e page object and "chat as anonymous" test

Migration v338:

  1. deletes the Accounts_AllowAnonymousWrite setting document
  2. deactivates and logs out any existing users holding the anonymous role
  3. pulls anonymous from every permission's role list and deletes the role document

Anonymous read (Accounts_AllowAnonymousRead) is untouched. The $ne: 'anonymous' filters in Users/Sessions stats aggregations are kept on purpose since historical user/session documents still carry the role id.

Issue(s)

https://rocketchat.atlassian.net/browse/CORE-1514

Steps to test or reproduce

  1. On a pre-9.0 database with Accounts_AllowAnonymousWrite enabled and at least one anonymous-role user, start the server on this branch.
  2. Confirm rocketchat_settings no longer has Accounts_AllowAnonymousWrite, rocketchat_roles has no anonymous doc, and no permission lists anonymous.
  3. Confirm the former anonymous user is active: false and cannot resume its session.
  4. Enable Accounts_AllowAnonymousRead, open a public channel logged out: composer only shows "Sign in to start talking".
  5. Admin > Settings > Accounts: the "Allow Anonymous Write" toggle is gone.

Further comments

Changeset marks @rocket.chat/meteor, @rocket.chat/i18n and @rocket.chat/ui-client as major.

Review in cubic

Removes Accounts_AllowAnonymousWrite, the "Or talk as anonymous" composer
action and the anonymous branch of the registerUser method. Follow-up to the
deprecation note (CORE-1514). Setting document is deleted on upgrade.
Drops the anonymous role from default permissions, role seeding and role
priority, removes the afterVerifyEmail method (its only job was promoting
anonymous users), and deletes the role/permission entries on upgrade.
@dionisio-bot

dionisio-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5a26e27

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@rocket.chat/meteor Major
@rocket.chat/i18n Major
@rocket.chat/ui-client Major
@rocket.chat/mock-providers Patch
@rocket.chat/ui-contexts Major
@rocket.chat/web-ui-registration Major
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/ui-composer Major
@rocket.chat/core-typings Major
@rocket.chat/rest-typings Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 06f2d2a2-49eb-4efb-8ad6-2146fea1bad8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.84%. Comparing base (2127948) to head (5a26e27).

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-9.0.0   #41828      +/-   ##
=================================================
- Coverage          69.35%   68.84%   -0.51%     
=================================================
  Files               4201     4133      -68     
  Lines             166609   158124    -8485     
  Branches           29743    28062    -1681     
=================================================
- Hits              115549   108858    -6691     
+ Misses             45920    44119    -1801     
- Partials            5140     5147       +7     
Flag Coverage Δ
e2e 59.17% <0.00%> (-0.05%) ⬇️
e2e-api 46.05% <33.33%> (+0.01%) ⬆️
unit 70.54% <100.00%> (-0.67%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant