fix(teams): create a team for Administrator on sites without one - #529
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
The manager dashboard at /b is gated on Buzz Team membership, not roles, and a fresh install created no team. Administrator was sent to their bookings and no one could reach Manage until a System Manager created a team in desk. after_install now creates "Administrator's Team" when the site has no team, and a patch does the same for sites already installed without one. Sites that have any team are left alone. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
NagariaHussain
force-pushed
the
fix/default-team-for-administrator
branch
from
October 4, 2026 13:56
8376618 to
1648ebf
Compare
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
NagariaHussain
enabled auto-merge
October 4, 2026 13:57
Contributor
Author
|
@harshtandiya you will have to approve, for review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a fresh install,
/bnever reaches the manager dashboard, even for Administrator with Event Manager. The dashboard router sends you to Manage only if you're a Buzz Team member (isTeamMember()→get_my_teams). Roles don't count, and nothing created a team on install:after_installonly set up categories, proposal statuses and custom fields.create_default_teamsleaves Administrator out, and patches don't run on fresh installs anyway.before_testscreates Administrator's team.Change
create_administrator_team()inbuzz/install.py. If the site has no Buzz Team, it creates one owned by Administrator using the existingcreate_default_team_for.after_installcalls it, so fresh sites open straight into Manage → Events.buzz.patches.create_administrator_teamdoes the same for sites already installed without a team. Sites with any team are left alone.Testing
TestCreateAdministratorTeaminbuzz/test_default_team_patches.pycovers both cases: a site with no teams gets one, and a site with teams gets none.get_my_teamsreturned it over HTTP, and re-running it added nothing.🤖 Generated with Claude Code