# Roles & Permissions

DailyPlay uses role-based access control to manage what team members can do within an organization.

## Available Roles

### Owner

The highest level of access. Owners have complete control over the organization.

**Permissions:**

- ✅ All Admin permissions
- ✅ Delete the organization
- ✅ Transfer ownership
- ✅ Manage billing (when applicable)

**Who should be Owner:**

- Founders
- Business owners
- Primary stakeholders

:::note
Every organization must have at least one Owner.
:::
---

### Admin

Full management capabilities without organization-level controls.

**Permissions:**

- ✅ All Editor permissions
- ✅ Invite and remove members
- ✅ Change member roles (up to Admin)
- ✅ Manage organization settings
- ✅ Access all analytics

**Who should be Admin:**

- Department heads
- Team leads
- Senior managers

---

### Editor

Content creation and management access.

**Permissions:**

- ✅ Create new games
- ✅ Edit existing games
- ✅ Manage vouchers and prizes
- ✅ Publish and archive games
- ✅ View analytics for their games

**Who should be Editor:**

- Content creators
- Marketing specialists
- Campaign managers

---

### Analyst

View-only access focused on data and analytics.

**Permissions:**

- ✅ View all games
- ✅ Access full analytics dashboard
- ✅ Export analytics data
- ❌ Cannot create or edit content

**Who should be Analyst:**

- Data analysts
- Business intelligence teams
- Reporting specialists

---

### Viewer

Basic view-only access.

**Permissions:**

- ✅ View published games
- ✅ View basic analytics
- ❌ Cannot create or edit anything
- ❌ Limited analytics access

**Who should be Viewer:**

- External stakeholders
- Clients (for review purposes)
- New team members (temporary)

---

## Permission Matrix

| Permission                   | Owner | Admin | Editor | Analyst | Viewer |
| ---------------------------- | ----- | ----- | ------ | ------- | ------ |
| View games                   | ✅    | ✅    | ✅     | ✅      | ✅     |
| Create games                 | ✅    | ✅    | ✅     | ❌      | ❌     |
| Edit games                   | ✅    | ✅    | ✅     | ❌      | ❌     |
| Delete games                 | ✅    | ✅    | ✅     | ❌      | ❌     |
| Manage vouchers              | ✅    | ✅    | ✅     | ❌      | ❌     |
| Configure prizes             | ✅    | ✅    | ✅     | ❌      | ❌     |
| View full analytics          | ✅    | ✅    | ✅     | ✅      | ❌     |
| Export analytics             | ✅    | ✅    | ✅     | ✅      | ❌     |
| Invite members               | ✅    | ✅    | ❌     | ❌      | ❌     |
| Remove members               | ✅    | ✅    | ❌     | ❌      | ❌     |
| Change member roles          | ✅    | ✅\*  | ❌     | ❌      | ❌     |
| Manage organization settings | ✅    | ✅    | ❌     | ❌      | ❌     |
| Delete organization          | ✅    | ❌    | ❌     | ❌      | ❌     |
| Transfer ownership           | ✅    | ❌    | ❌     | ❌      | ❌     |

\* Admins can only assign roles up to Admin level (not Owner) and can only modify members with lower roles.

---

## Role Hierarchy

Roles follow a hierarchy where higher roles can manage lower roles:

```
Owner
  └── Admin
        └── Editor
              └── Analyst
                    └── Viewer
```

**Key Rules:**

1. You can only assign roles **at or below your level**
2. Owners can change their own role (unless they are the last Owner)
3. Higher roles inherit all permissions from lower roles

---

## Choosing the Right Role

### Scenario-Based Recommendations

| Scenario                          | Recommended Role |
| --------------------------------- | ---------------- |
| Full-time employee, creates games | Editor           |
| Manager overseeing team           | Admin            |
| External agency partner           | Editor or Viewer |
| Client reviewing campaigns        | Viewer           |
| Data team member                  | Analyst          |
| C-suite executive                 | Owner or Admin   |
| Intern/trainee                    | Viewer           |
| Freelance designer                | Editor           |

---

## Upgrading and Downgrading Roles

### When to Upgrade

- Employee takes on more responsibility
- Temporary elevation for a specific project
- Promotion within the team

### When to Downgrade

- Change in job responsibilities
- Project completion (for temporary elevations)
- Security concerns

:::tip[Principle of Least Privilege]
Always assign the minimum role required for someone to do their
job. This improves security and reduces the risk of accidental changes.
:::

---

## Troubleshooting

### "You cannot assign a role higher than your own"

You're trying to promote someone to a level above yours. Ask an Owner or higher-level Admin to make
this change.

### "Cannot modify the last owner"

Every organization needs at least one Owner. To step down as Owner, first assign another member as
Owner.

### Member can't access feature

Check their role has the required permission in the matrix above. Upgrade their role if needed.

## Next Steps

- [Manage Members](/organizations/members) in your organization
- Set up [Rewards & Prizes](/rewards/overview) for your games