Account Bundle
Account Bundle lets a company, team, or organization own application data while users access that data through memberships. A user can belong to several accounts, and an account can keep its projects, subscriptions, or invoices when its users change.
The bundle provides account and membership model contracts, current-account resolution from routes, a base access voter, optional Doctrine scoping, and registration, settings, member-list, account-list, and administration screens. Your application supplies the concrete entities and the business permissions inside each account.
Build an account area
- Install the bundle after User Bundle and Twig Extra Bundle.
- Create the entities: an account, a membership, and an existing user with membership support.
- Add account-aware routes, such as
/account/{_account}/projects. - Apply access rules and test both permitted and denied membership cases.
- Scope account-owned entities and assign the account explicitly in background work.
For example, two users can share Example Studio while one also belongs to Example Foundation. The current route selects the account context; a membership grants entry to that account. Application voters decide which member may edit a project or manage billing.
Add the bundled workflows
Registration and settings covers self-service account creation, the current account's settings, its members, and the user's account list. Administration and security covers central account CRUD and permissions.
Use Extension points to adapt forms, redirects, managers, and templates. Keep membership roles on the membership entity and interpret them in application authorization rules; they are not automatically global Symfony roles.
Model names in 6.0
The current API uses AccountMembership, AccountMembershipInterface, AccountMembershipsInterface, and UserAccountMembershipsInterface. Account-owned records use AccountOwnedInterface; opt into automatic filtering with AccountScopedInterface.
Older AccountUserRelation, AccountManyUserRelations*, MultiAccounted*, SingleAccounted*, and AccountFilterInterface examples do not describe this line. Update application code and mappings together when migrating from those APIs.