> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.pgecom.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 09- Team Management

# Team & Tenant Management

The platform uses a multi-tenant system where every user belongs to one or more teams (tenants). This guide explains how to manage your teams.

---

## Understanding Tenants

A **tenant** is an organization, team, or workspace on the platform.

* Every user belongs to at least one tenant.
* When you sign up, a **default tenant** is created for you automatically.
* All your trades, offers, and wallet data are **scoped to your current tenant**.
* You can belong to **multiple tenants** — for example, a personal account and a business account.
* Each tenant has its own **members, roles, and data**.

---

## Switching Between Tenants

1. Look at the **top of the sidebar** for the tenant dropdown.
2. Click the dropdown to see all tenants you belong to. Your active tenant is highlighted.
3. Select a different tenant.
4. The dashboard refreshes immediately to show that tenant's data.

> **Tip**: Your selected tenant is remembered. When you log in again, you return to the last tenant you were viewing.

---

## Inviting Team Members

To add someone to your team:

1. Go to **Dashboard > Settings > Team** tab (or **Dashboard > Team**).
2. Click **Invite Member**.
3. Fill in the invite form:
* **Email** (required) — The person's email address
* **Name** (optional) — Their display name
* **Role** — Select a role (see role descriptions below). Each role includes a brief description of its capabilities.
4. Click **Send Invitation**.

The invitation is sent and appears in the **Pending Invites** table with the invitee's email, name, assigned role, and expiry date.

### What the Invited Person Sees

* **If they already have an account**: They can accept the invitation and the tenant appears in their dropdown.
* **If they are new**: They are directed to the signup page (`/signup?invite=TOKEN&tenant=ID`) with their email pre-filled. After signing up, they automatically join your team with the assigned role.

---

## Pending Invites

The team page shows a **Pending Invites** section with:

| Column | Description |
| ---- |
| **Email** | The invitee's email address |
| **Name** | The invitee's name (if provided) |
| **Role** | The assigned role (shown as a badge) |
| **Expiry** | When the invitation expires |

Invitations that have not been accepted yet appear here until they expire or are accepted.

---

## Active Members

The team page shows an **Active Members** table with:

| Column | Description |
| ---- |
| **Name** | Member's display name |
| **Email** | Member's email address |
| **Role** | Current role (shown as a badge) |
| **Joined** | When they joined the team |
| **Actions** | Available management actions |

---

## Role Descriptions

Each team member has a role that determines what they can do. Roles are hierarchical (level 1–5):

### Owner (Level 5)

* **Full access** to everything.
* Can manage team members, roles, and settings.
* Can view all trades and offers in the tenant.
* Can delete the tenant.
* There is typically one owner per tenant.

### Admin (Level 4)

* Can manage trades, disputes, and users.
* Can view **all** trades in the tenant (not just their own).
* Can invite and remove members (except the owner).
* Can manage settings and integrations.
* Cannot delete the tenant or change the owner.

### Manager (Level 3)

* Can execute and manage trades.
* Can view **all** trades in the tenant.
* Can create and manage offers.
* Can handle disputes.
* Cannot manage team members.

### Member (Level 2)

* Can create offers and trade.
* Can only see **their own** trades and offers.
* Standard access level for most team members.

### Viewer (Level 1)

* **Read-only** access.
* Can view all trades in the tenant but **cannot take any actions**.
* Trade action buttons are disabled.
* Chat is read-only.
* Wallet deposits and withdrawals are hidden.
* Useful for monitoring or auditing purposes.

---

## Permissions Summary

| Capability | Owner | Admin | Manager | Member | Viewer |
| ---- |
| Create offers | Yes | Yes | Yes | Yes | No |
| Place trades | Yes | Yes | Yes | Yes | No |
| View own trades | Yes | Yes | Yes | Yes | Yes |
| View all tenant trades | Yes | Yes | Yes | No | Yes |
| Manage team members | Yes | Yes | No | No | No |
| Change roles | Yes | No | No | No | No |
| Chat in trades | Yes | Yes | Yes | Yes | No (read-only) |
| Manage settings | Yes | Yes | No | No | No |
| Manage integrations | Yes | Yes | No | No | No |
| Delete tenant | Yes | No | No | No | No |

---

## Custom Permissions

Beyond the base role, you can set **custom permission overrides** for individual members:

1. Go to **Dashboard > Settings > Team** tab.
2. Find the member and click **Edit Permissions** in their Actions dropdown.
3. The **Edit Member Permissions** dialog shows a matrix of resources and actions:

| Resource | Available Actions |
| ---- |
| **Tenant** | Read, Update, Delete |
| **Integrations** | Read, Create, Update, Delete |
| **Trade Offers** | Read, Create, Update, Delete |
| **Trades** | Read, Create, Update, Delete |
| **Wallet** | Read, Create, Update, Delete |
| **Team** | Read, Create, Update, Delete |
| **Settings** | Read, Update |
| **Reports** | Read |

4. Grant or revoke specific permissions on top of the member's base role.
5. Click **Save** to apply changes.

This lets you fine-tune access — for example, giving a Member role the ability to view reports, or preventing a Manager from modifying settings.

---

## Assigning and Changing Roles

Owners and admins can change member roles (for members below their own level):

1. Go to **Dashboard > Settings > Team** tab.
2. Find the member whose role you want to change.
3. Click their **Actions** dropdown.
4. Select **Change to [role]** — available role options are shown based on your permission level.
5. The member's permissions update immediately.

---

## Removing Team Members

Owners and admins can remove members from the team:

1. Go to **Dashboard > Settings > Team** tab.
2. Find the member you want to remove.
3. Click **Remove from team** in their Actions dropdown.
4. Confirm the removal.

Once removed:
* The member loses access to the tenant's data.
* Their personal data and other tenant memberships are not affected.
* They can be re-invited later if needed.

> **Warning**: Removing a member does not cancel their active trades. Complete or resolve any open trades before removing someone.
