thoughtco/statamic-restrict-fields

There is no license information available for the latest version (1.1.0) of this package.

Installs: 9 829

Dependents: 0

Suggesters: 0

Security: 0

Stars: 6

Watchers: 4

Forks: 1

Open Issues: 0

Language:JavaScript

1.1.0 2023-11-13 10:28 UTC

This package is auto-updated.

Last update: 2024-10-30 13:06:11 UTC


README

Restrict Fields is a Statamic addon that allows you to restrict fields in the control panel to certain users, groups or roles.

How to Install

Run the following command from your project root:

composer require thoughtco/statamic-restrict-fields

How to Use

Once installed, 3 new custom condition methods become available to use:

restrictUsers

Use with a value in the format: restrictUsers:user_id_1,user_id_2

restrictGroups

Use with a value in the format: restrictGroups:group_slug_1,group_slug_2

restrictRoles

Use with a value in the format: restrictRoles:role_slug_1,role_slug_2

Including superadmins

You may pass super to the restrictGroups and restrictRoles condition methods in order to include superadmins.

Example: restrictGroups:super,group_slug_1,group_slug_2