Page Contents
Important:
Before running this generator, you must create an application using the application generator.
Then you must run the command from the root directory of the application.
Synopsis
Adds a new access control list (ACL) entry to a LoopBack application.
$ [slc | apic] loopback:acl [options]
Important:
You cannot modify built-in models using the ACL generator, only custom models you have defined, for example, with the Model generator.
Options
-h, --help
Print the generator’s options and usage.
--skip-cache
Do not remember prompt answers. Default is false.
--skip-install
Do not automatically install dependencies. Default is false.
Interactive Prompts
The tool will prompt you for the necessary information and then modify the Model definition JSON file accordingly.
The generator prompts for:
- Name of the model to which you want to apply access control or all models.
- Scope of access control: All methods and properties or a specific method.
- If you choose a specific method, the method’s name.
- Access type: read, write, execute, or all.
- Role: all users, any unauthenticated user, any authenticated user, the object owner.
- Permission to apply: explicitly grant access or explicitly deny access.
For general information about setting up ACLs, see Controlling data access.