Section 16 Official Documentation

Team & Role-Based Access Control (RBAC)

A complete guide to inviting team members to manage your HosteDay apps, assigning granular roles (Owner, Admin, Developer, Billing Manager, Viewer) with strict per-app isolation and full audit logging.

Team & Role-Based Access Control (RBAC)

A complete guide to inviting team members to manage your HosteDay apps, assigning granular roles (Owner, Admin, Developer, Billing Manager, Viewer) with strict per-app isolation and full audit logging.


1. Overview & Per-App Isolation

HosteDay's Team & Role-Based Access Control (RBAC) system operates at the level of each individual application / hosting environment (HostingEnvironment), rather than across your entire account.

This strict per-app isolation ensures that inviting a collaborator to a specific app (e.g., app1.hosteday.com) grants them access only to that application — with zero visibility into the owner's other apps, unused subscriptions, or personal account data.

Navigating Shared Workspaces in the Dashboard (dash.hosteday.com)

When you belong to one or more application teams, the dashboard automatically adapts to keep your workspaces organized:

  • Apps Sidebar: Clearly split into two sections:
    1. My Apps: Applications you created and own as the primary Owner.
    2. Shared with Me: Applications where you are an active team member, displaying your current role badge (Admin, Developer, Billing Manager, or Viewer) directly under each app.
  • Workspace Switcher: Available in the top header bar to switch seamlessly between owned and shared apps while keeping your active role visible at a glance.
  • Direct App Team Access: Open a project's team page directly from the App Team button on the main app card, or via: https://dash.hosteday.com/settings/team/{environment_id}

2. Team Seats & Plan Limits

Each application's allowed team size is enforced automatically based on its active hosting plan (EnvironmentEntitlement).

Core Seat Calculation Rule

  • The Primary Owner does NOT count toward your seat limit. Your plan's quota represents the number of additional invited members you can add alongside the owner.
  • Pending Invitations temporarily reserve a seat until accepted, cancelled, or expired:
Used Seats = Active Non-Owner Members + Pending Invitations

Seat Allowance by Plan

Plan Additional Team Members (Excluding Owner) Total Including Owner
Starter Up to 3 members 4 members
Pro Up to 8 members 9 members
Business Up to 20 members 21 members
Custom Custom agreement Custom

Note: When your app reaches its seat limit, an upsell banner appears inside the App Team page with a direct link to Upgrade Plan, letting you expand your team capacity immediately with zero downtime.


3. Roles & Complete RBAC Permissions Matrix

HosteDay provides five purpose-built roles designed around the principle of least privilege:

  1. Primary Owner (Owner): Full unrestricted control over the app, databases, files, APIs, team management, billing & subscriptions, and app deletion. The primary owner's role can never be modified or removed.
  2. Admin (Admin): Manages team members (invite, change roles, remove — excluding the owner) and has full technical access to databases, phpMyAdmin, files, API settings/protection, hooks, scheduled jobs, and backups. Restricted from billing and app deletion.
  3. Developer (Developer): Full technical access to manage tables, phpMyAdmin, FileBrowser Quantum, API Settings/Tester/Protection, Hooks, Scheduled Jobs, Flutter CLI integration, and Backups/Exports. Restricted from team management, billing, and app deletion.
  4. Billing Manager (Billing Manager): Scoped billing access to the assigned app's subscription on /my-subscriptions to manage renewals, plan upgrades, feature purchases, and invoices only. Strictly blocked from databases, files, APIs, and app deletion.
  5. Viewer (Viewer): Read-only observer access to inspect app details, status, general statistics, and logs without any edit, database, or delete permissions.

Full Permissions Matrix

Section / Action Owner Admin Developer Billing Manager Viewer
View App Dashboard, Details & Status ✅ ✅ ✅ ❌ ✅
View General Statistics & Logs ✅ ✅ ✅ ❌ ✅
Detailed Database Statistics Widget ✅ ✅ ✅ ❌ ❌
Manage Tables (Data Manager) & phpMyAdmin ✅ ✅ ✅ ❌ ❌
File Manager (FileBrowser Quantum) & Custom Pages ✅ ✅ ✅ ❌ ❌
API Settings, API Tester & API Protection ✅ ✅ ✅ ❌ ❌
Push Notifications, Table Hooks & Scheduled Jobs ✅ ✅ ✅ ❌ ❌
Backups & Project Export (Export & Backup) ✅ ✅ ✅ ❌ ❌
Start / Stop / Restart App (Lifecycle) ✅ ✅ ✅ ❌ ❌
View Team Members List ✅ ✅ ✅ ✅ ✅
Invite Members, Update Roles & Remove Members ✅ ✅ ❌ ❌ ❌
View Team Activity Log (Audit Log) ✅ ✅ ❌ ❌ ❌
Manage Billing, Renewals & Upgrades (/my-subscriptions) ✅ ❌ ❌ ✅ ❌
Request Refunds & Create New Apps ✅ ❌ ❌ ❌ ❌
Permanently Delete App & Environment ✅ ❌ ❌ ❌ ❌

4. Invitation Lifecycle & Strict Security

1. Sending an Invitation

  1. Open the App Team page (/settings/team/{environment_id}) and go to Invite New Member.
  2. Enter the collaborator's email address and choose a role — an instant permissions summary appears directly below the role selector so you can verify access before sending.
  3. Click Send Invitation to dispatch an official HosteDay-branded email in the sender's active interface language (ar or en), containing a secure token valid for 48 hours.

2. Managing Pending Invitations

All unaccepted invitations appear under Pending Invitations with their expiration countdown. Owners and Admins can:

  • Resend: Rotates the token, extends expiration by 48 hours, and re-sends the email.
  • Cancel: Immediately invalidates the link and frees the reserved seat.

3. Strict Email Matching on Acceptance

To protect user accounts and prevent accidental acceptance under the wrong account:

  • When opening an invitation link via HosteDay's SSO portal (auth.hosteday.com), the system enforces Strict Email Matching between the signed-in account and the invited email address.
  • If signed in as a different account (including the primary owner), acceptance is strictly blocked with 403 Forbidden with no override button, offering a safe Sign Out & Sign In with Invited Account button instead.
  • If the invitee does not yet have a HosteDay account, they are guided through registration with the invited email and automatically added to the app team upon completion.

5. Managing Members, Interactive Role Preview (VS) & Notifications

The App Team page is engineered for clarity and accidental-change prevention:

  • Full-Width Primary Owner Card: Displayed prominently at the top of the page showing the owner's identity and full-control summary with no edit or delete controls.
  • Responsive Member Cards: Each additional member appears in a clean card displaying their name, email, current role badge, join date, and a summary of their current role permissions.
  • Interactive Current Role VS New Role Comparison: Changing a member's role dropdown never auto-submits. Selecting a different role reveals an instant side-by-side comparison box (Current Role VS New Role) detailing the new role's responsibilities and activates the green Apply New Role confirmation button.
  • Automatic Role-Update Email Notification: As soon as a role change is applied, HosteDay dispatches an official localized email notification to the member showing their Previous Role vs New Role, updated permissions list, and a direct button to open the app dashboard — purely informational, with no re-acceptance required.

6. Visual UI Guards & Custom 403 Forbidden Experience

Role permissions are enforced consistently across both the Frontend UI and Backend Policies & Middleware:

  • Disabled Unauthorized Controls: Action cards, tabs, and lifecycle buttons (Stop / Restart / Delete) outside a member's role are visually and programmatically disabled (disabled, lock icon, and tooltip), while all Livewire actions and backend endpoints enforce server-side 403 guards.
  • Protected Lazy Widgets: On /statistics, the lazy-loaded Database Statistics component is automatically withheld for Viewer and Billing Manager roles and replaced with a clean informational notice — preventing failed background requests.
  • Custom 403 Forbidden Page: Navigating directly to a restricted URL displays a helpful HosteDay 403 page showing:
    1. Your account email, active app domain, and current role badge.
    2. The exact permission required for that section.
    3. A clear two-column breakdown of What you can do with your role vs Restricted for your role.
    4. A smart action button that routes you back to the nearest permitted section.

7. Billing Manager Isolation on /my-subscriptions

When a Billing Manager visits https://dash.hosteday.com/my-subscriptions:

  • They see only the subscription linked to the specific app they are assigned to, clearly labeled with the app domain and a Billing Manager badge.
  • They can perform Plan Upgrades, Plan Renewals/Extensions, Feature Purchases, and Feature Extensions.
  • Strict Owner Isolation: The owner's other app subscriptions and unused/idle subscriptions remain completely hidden, and owner-only actions such as Refunds and Create New App are disabled.

8. Team Activity Log (Audit Log) & Security Best Practices

Every application maintains a fully localized Team Activity Log visible to Owners and Admins at the bottom of the App Team page, recording every team action with actor, target, and timestamp:

  • Invitations sent, resent, cancelled, and accepted.
  • Member role updates with exact old role → new role transitions (e.g., "Updated dev@company.com role from Developer to Admin by owner@company.com").
  • Member removals and environment deletions.

Security Best Practices

  • Follow Least Privilege: Assign Developer rather than Admin to engineers who don't need to invite users; assign Billing Manager strictly to finance personnel and Viewer to stakeholders or clients.
  • Audit Pending Invitations Regularly: Cancel unused invitations promptly to reclaim team seats and keep invite tokens tight.
  • Revoke Access Immediately: Removing a member from the App Team page revokes their dashboard, phpMyAdmin, and FileBrowser access instantly.