* feat(teams): add Team model and migrations
Create teams table with name, account_id, uuid, archived_at.
Add team_id foreign key to users, templates, submissions,
submitters, and template_folders. Backfill migration creates
a Default team per account and assigns all existing records.
* feat(teams): add team associations to models
User belongs_to team (required). Template, Submission, Submitter,
and TemplateFolder belong_to team (optional for backwards compat).
Account has_many teams with default_team helper. Add EDITOR_ROLE
to User::ROLES and editors scope.
* feat(auth): rewrite abilities with role + team scoping
Admin retains full account-wide access. Editor gets team-scoped
access to templates, submissions, submitters, folders, plus
account-wide access to AccountConfig and WebhookUrl.
ProfileController uses authorize!(:update) instead of :manage
so editors can access their own profile page.
* feat(teams): add team CRUD controller and views
Admin-only team management at /settings/teams. Create, edit,
and archive teams. Index view uses eager-loaded user counts
to avoid N+1 queries. Routes added in settings scope.
* feat(teams): add role and team selection to user management
Enable editor role in role select (remove Pro upsell gate).
Add team dropdown to user form visible to admins only.
Validate team_id belongs to current account on create.
* feat(teams): assign team_id on resource creation
Set team_id from current_user.team_id when creating templates,
submissions, submitters, and folders. Setup controller creates
Default team alongside first account for greenfield installs.
* feat(teams): add move-folder-to-team and editor settings access
Admins can move folders between teams via the folder edit modal.
Moving cascades team_id to all templates, submissions, and
submitters in a transaction. Editors can now access
personalization, API, and webhook settings.
* docs: document teams and roles feature in README
---------
Co-authored-by: Sebastian Noe <sebastian.schneider@boxine.de>