# Team Roles (https://yapl.app/en/docs/user-guides/teams/team-roles)

# Team Roles

YAPL uses a role-based permission system within teams. Each member has exactly one role that determines their capabilities within the team and its assigned projects.

## Available Roles

YAPL provides three team roles:

| Role | Description | Permission Level |
|------|-------------|------------------|
| **Lead** | Team administrators | Full access |
| **Member** | Standard participants | Edit access |
| **Viewer** | Read-only access | View only |

## Lead Role

Team Leads are administrators responsible for team management.

### Capabilities

| Capability | Lead |
|------------|------|
| View team content | Yes |
| Edit team content | Yes |
| Create projects/plans | Yes |
| Delete projects/plans | Yes |
| Invite members | Yes |
| Remove members | Yes |
| Change member roles | Yes |
| Edit team settings | Yes |
| Delete team | No* |
| Assign items to team | Yes |

*Only **workspace owners** can delete teams, not team leads.

### Use Cases

Assign Lead role to:
- Department heads
- Project managers
- Team supervisors
- Anyone needing full team control

### Requirements

- Every team must have **at least one Lead**
- You cannot demote or remove the last Lead
- Multiple Leads are allowed

<Callout type="warn">
Before removing a Lead or changing their role, ensure at least one other Lead exists.
</Callout>

## Member Role

Members are standard team participants who can contribute to work.

### Capabilities

| Capability | Member |
|------------|--------|
| View team content | Yes |
| Edit team content | Yes |
| Create projects/plans | Yes |
| Delete projects/plans | No |
| Invite members | No |
| Remove members | No |
| Change member roles | No |
| Edit team settings | No |
| Delete team | No |
| Assign items to team | No |

### Use Cases

Assign Member role to:
- Active contributors
- Team participants
- Staff who need to edit work
- Day-to-day team workers

## Viewer Role

Viewers have read-only access to team content.

### Capabilities

| Capability | Viewer |
|------------|--------|
| View team content | Yes |
| Edit team content | No |
| Create projects/plans | No |
| Delete projects/plans | No |
| Invite members | No |
| Remove members | No |
| Change member roles | No |
| Edit team settings | No |
| Delete team | No |
| Assign items to team | No |

### Use Cases

Assign Viewer role to:
- Stakeholders needing visibility
- External consultants
- Auditors or reviewers
- People who need to monitor without changing

## Role Comparison

### Quick Comparison

| Action | Lead | Member | Viewer |
|--------|------|--------|--------|
| View projects | Yes | Yes | Yes |
| Edit tasks | Yes | Yes | No |
| Create tasks | Yes | Yes | No |
| Create projects | Yes | Yes | No |
| Delete projects | Yes | No | No |
| Manage team | Yes | No | No |
| Invite members | Yes | No | No |

### Permission Hierarchy

```
Lead (Full Access)
  └── Member (Edit Access)
        └── Viewer (View Only)
```

## Changing Roles

### Who Can Change Roles

Only **Leads** can modify member roles within their team.

### How to Change a Role

1. Open the team
2. Navigate to **Members** tab
3. Find the member
4. Click role dropdown or member actions
5. Select the new role
6. Confirm the change

### Role Change Rules

| Scenario | Allowed |
|----------|---------|
| Promote Viewer to Member | Yes |
| Promote Member to Lead | Yes |
| Demote Lead to Member | Yes (if other Lead exists) |
| Demote Lead to Viewer | Yes (if other Lead exists) |
| Demote last Lead | No |

## Role Inheritance

### Workspace Owners

Workspace owners have special access:
- Full access to all teams (via Workspace Owners team)
- Can manage any team
- Not restricted by team roles

### Team Roles vs. Workspace Roles

| Role Type | Scope | Source |
|-----------|-------|--------|
| Workspace Owner | Entire workspace | Workspace settings |
| Team Lead | Within team | Team membership |
| Team Member | Within team | Team membership |
| Team Viewer | Within team | Team membership |

## Default Permissions

Teams have default permissions that work with roles:

```json
{
  "projects": {
    "create": true,
    "view": true,
    "update": true,
    "delete": false
  }
}
```

These defaults can be modified by workspace administrators.

## Role Assignment Best Practices

### Lead Assignment

- Assign Leads who can manage the team
- Consider having 2+ Leads for coverage
- Leads should be active in the team

### Member Assignment

- Default role for most contributors
- Anyone actively working on projects
- Staff who need to update tasks/plans

### Viewer Assignment

- Minimize Viewer usage when possible
- Use for genuine read-only needs
- Consider if access is needed at all

## Multiple Team Membership

Members can belong to multiple teams:
- Different roles in different teams
- Access combines across teams
- Most permissive role wins for shared content

**Example:**
- User is Lead in Team A
- User is Viewer in Team B
- User has Lead access to Team A projects, Viewer to Team B projects

## Troubleshooting

### Cannot Change Role

**"Cannot demote last Lead"**
- Promote another member to Lead first
- Every team needs at least one Lead

**"You don't have permission"**
- Only Leads can change roles
- Check your role in the team

### Role Not Working as Expected

- Verify the role was saved
- Refresh the page
- Check if user has higher access via another team
- Check if user is workspace owner (full access)

### Cannot Perform Action

- Verify your role permits the action
- Check project-level permissions
- Contact team Lead for access upgrade

## Related Topics

- [Creating Teams](/docs/user-guides/teams/creating-teams) - Setting up teams
- [Managing Members](/docs/user-guides/teams/managing-members) - Member administration
- [Managing Owners](/docs/user-guides/workspaces/managing-owners) - Workspace ownership