Skip to content

fix(teams): create a team for Administrator on sites without one - #529

Merged
NagariaHussain merged 1 commit into
developfrom
fix/default-team-for-administrator
Oct 4, 2026
Merged

NagariaHussain merged 1 commit into
developfrom
fix/default-team-for-administrator

Conversation

@NagariaHussain

Copy link
Copy Markdown
Contributor

Problem

On a fresh install, /b never 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_install only set up categories, proposal statuses and custom fields.
  • create_default_teams leaves Administrator out, and patches don't run on fresh installs anyway.
  • Tests hid the gap because before_tests creates Administrator's team.

Change

  • New create_administrator_team() in buzz/install.py. If the site has no Buzz Team, it creates one owned by Administrator using the existing create_default_team_for.
  • after_install calls it, so fresh sites open straight into Manage → Events.
  • New patch buzz.patches.create_administrator_team does the same for sites already installed without a team. Sites with any team are left alone.

Testing

  • New TestCreateAdministratorTeam in buzz/test_default_team_patches.py covers both cases: a site with no teams gets one, and a site with teams gets none.
  • Ran the patch on a local site with no teams. It created "Administrator's Team" with Administrator as Owner, get_my_teams returned it over HTTP, and re-running it added nothing.

🤖 Generated with Claude Code

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
NagariaHussain force-pushed the fix/default-team-for-administrator branch from 8376618 to 1648ebf Compare October 4, 2026 13:56

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@NagariaHussain

Copy link
Copy Markdown
Contributor Author

@harshtandiya you will have to approve, for review.

@NagariaHussain
NagariaHussain merged commit 74d8bf6 into develop Oct 4, 2026
8 checks passed
@NagariaHussain
NagariaHussain deleted the fix/default-team-for-administrator branch October 4, 2026 15:28
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