New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@orelo/payload-default-roles

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orelo/payload-default-roles

Adds default access permissions to all collections

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
Maintainers
2
Weekly downloads
 
Created
Source

Payload Default Roles

Add default roles for access control on all collections.

Options

  • ignoredSlugs: string[] Optional

    An array of the slugs from the collections this plugin should leave untouched.

  • roles: string[] Optional

    An array of the roles this plugin should default access to.
    Default: ["admin", "executive"]

Example

// payload.config.ts
import { buildConfig } from 'payload/config';
import { defaultAccess } from '@orelo/payload-default-roles';

export default buildConfig({
  plugins: [
    defaultAccess(), // Pass nothing to use the default options
  ],
});

Example with Options

export default buildConfig({
  plugins: [
    defaultAccess({
      ignoredSlugs: ['cms-user', 'admin'],
      roles: ['administrator', 'moderator'],
    }),
  ],
});

Keywords

FAQs

Package last updated on 01 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc