# Deprecating the user of \`user.groups\` in the \`User\` model in JavaScript

**URL:** https://meta.discourse.org/t/deprecating-the-user-of-user-groups-in-the-user-model-in-javascript/411124
**Category:** Development
**Tags:** dev-news
**Created:** [August 28, 2026, 4:03am UTC](https://meta.discourse.org/t/deprecating-the-user-of-user-groups-in-the-user-model-in-javascript/411124 "2026-08-28T04:03:59Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [August 31, 2026, 1:12am UTC](https://meta.discourse.org/t/deprecating-the-user-of-user-groups-in-the-user-model-in-javascript/411124/6 "2026-08-31T01:12:56Z")

</div>

The PR is merged now, so it’s deprecated:

> <https://github.com/discourse/discourse/pull/42711>
>
> Renaming this array to user.visibleGroups/currentUser.visibleGroups to
> make it …clear that this is not the full list of groups a user belongs
> to, but only the ones that are visible to the current user.
> 
> Adds a \`deprecated\` warning when calling \`user.groups\` on the client, and
> adds a \`user.visibleGroups\` alias to the new property.

But yes as Moin says you will only get browser console deprecation warnings for now 🙂 When we first introduce a deprecation we are forced to fix all the instances in core + official plugins and themes, then for a while we leave the deprecation on and are able to gradually fix or let others fix third party themes, including customer themes.

This won’t become a permanent removal of `user.groups` for quite some time until we are sure we’ve caught all the call sites, and even then we start showing an admin warning first to sites that still have code calling the old site.

---

_[View the full topic](https://meta.discourse.org/t/deprecating-the-user-of-user-groups-in-the-user-model-in-javascript/411124)._
