Default admin doesn’t receive ‘staff’ or ‘admin’ group memberships at first

Edit: The issue is that the default admin isn’t added to ‘staff’ or ‘admin’ groups initially despite showing as admin: yes in their profile.


Just tinkering with a new test instance and noticed that after enabling chat the default admin couldn’t see the speech bubble and chat/browse/open kicked them back to /latest.

I had chat_allowed_groups set at:

So that user should really be able to see chat.

Once I add them to TL4, the chat bubble appears. If I remove TL4 from the admin user then they once again lose access.

2.9.0 beta 10 (cf646b2061) with chat v0.4.

3 Likes

I think I’ve seen something like this previously. Is it the addition of both staff and admins? Does removing one of those allow the admin to chat without bumping their trust level?

1 Like

I’ve just tried both combinations, neither resolves it:


2 Likes

Hmm… I haven’t been able to reproduce this yet myself.

Does this user have the “developer” role?

Which commit of chat? (Not sure if there’s a better way to determine that then going into the container)

On their user page in admin, what does it show under “Groups”?

And what does it show for Admin? and Moderator?

1 Like

This is a fresh instance built by hand on DO this morning, I’m effectively testing the current out-of-box experience. They have automatic TL group memberships, no custom ones. Admin yes, moderator no - it’s the default admin on a new instance, so following the defaults.

Chat commit c77dc37a

2 Likes

And do they show the Automatic “staff” and “admins” groups memberships as well?

1 Like

I have spun up a fresh self-hosted site on DO with the chat plugin and I can confirm that this also happened to me:

  • Installed using the standard install guide (editing in the Chat plugin to app.yml)
  • Registered admin
  • Completed setup wizard (first 3 steps)
  • Enabled Chat from plugin page
  • Added staff admins trust_level_3 trust_level_4
  • Refreshed page

  • No Chat bubble on screen
  • /chat/browse redirects to Latest

Other notes:

  • Only having staff in the allowed chat groups also does not make Chat appear for this admin user

  • Making them moderator does enable chat for them
  • After granting moderator status and then removing it Chat is still enabled for this admin user
2 Likes

It looks like the automatic groups aren’t being applied. I’ve just spun up another instance and the default admin only has trust levels, they don’t have ‘staff’ or ‘admin’. I can trigger those memberships by either making them a moderator, or creating another admin. I was tempted to leave the instance overnight to see whether a sidekiq job would address this, but it probably shouldn’t be in that state for the only admin on a fresh instance for any amount of time.

So it looks like the issue isn’t chat, as much as the memberships of the default admin on a fresh instance… Will rename this topic and remove the chat tag.

2 Likes

Is this a new issue? Are you suggesting that the new admin should be an admin and moderator? I wonder if this was a design decision long ago or a new change.

As regards chat, it seems to me like the admin user should be able to access all chat even if they are not listed in chat allowed groups, just like they can access everything else on the site.

As it happens, I was looking at the new user experience this week too and noticed that the groups page on a new site is potentially confusing for the first non-staff to show up. It’s bland, only the moderators group shows up on the list, and there are no members of the moderators group.

The default admin should be a member of the admins group and the staff group. On the instances I created today that wasn’t the case. Their only group memberships initially were TL0 and TL1, giving them TL4 solved the symptom I was observing with chat but not the root cause.

If I manually added them as a moderator they received the staff group membership. If I added another admin their memberships were corrected.

2 Likes

Bit late, but just to add in a screenshot now I’ve spun up a second one :slight_smile: This is the admin’s user page on a fresh install:

Compared to one from my existing test site:


Though while I was there I went to /sidekiq and ran Jobs::EnsureDbConsistency and that did fill in the right automatic groups. Like @Stephen said earlier though, it should really be ready from start up.

4 Likes

I just merged a core fix for this, we likely didn’t notice this previously since less settings relied on these auto groups, but now we are generally heading in the direction of using group_list site settings so this should help:

7 Likes

I’ve just spun up a new one for another issue and can confirm that the admin is now added to the automatic staff and admins groups right away. :+1:

6 Likes

This topic was automatically closed after 22 hours. New replies are no longer allowed.