Overview of Access Control (Video + Example Repo)

Published On
Overview of Access Control (Video + Example Repo)
Overview of Access Control (Video + Example Repo)

Access Control is one of Payload's most important features. It gives you the power to build any type of access control pattern that you can dream up, and is much more powerful than other headless CMS' rigid RBAC patterns.

For example, with Access Control, you can do things like the following:

  • Build a multi-tenant implementation of Payload, where users can only see site content that they have been explicitly given access to
  • Restrict who can see draft documents, and who can see published documents
  • Restrict a user to only see their own orders, and no one else's
  • Tie a User to an Organization, and allow that user to only interact with its organization's resources
  • Create a role-based access control pattern where certain roles grant differing levels of editability to your content
  • Much, much more

We've filmed a quick video that walks through how Payload's access control works, and have provided an example repo that contains the code we go through in the video.

Payload's access control is completely code-based and highly declarative. It's built on top of a simple function-based pattern that, in practice, is super flexible and powerful.

Take a look at the video above. We'd love to know what you think about the format of these videos, and hope that you find them helpful as you learn how to build with Payload. We have lots more coming!

Give us a star on GitHub

Join our community on Discord

We've recently started a Discord community for the Payload community to interact in realtime. Often, Discord will be the first to hear about announcements like this move to open-source, and it can prove to be a great resource if you need help building with Payload. Click here to join!

Get up and running with one line

Getting started is easy—and free forever. Just fire up a new terminal window and run the following command:

1
npx create-payload-app