Home
About
Permissions is about making managing user permissions easier. You can create your own permissions, roles, users and more are soon to come! Permissions is an easy way to see what user's have access to. You could use integrate this with any NodeJS application! Permissions is also made to be as simple as possible. Check out the examples!
Installation
Installation is easy!
$ npm i permissions
I don't think you needed me for that, though.
Configuration
At the moment you can't configure anything, but it will come soon!
Usage
For advanced usage please visit our documentation. The following is just fo r quick reference.
Declaring Permissions Requirement
const permissions = ;
Adding Permissions
const permissionsToAdd = "a" "b";const permissionsFile = 'permissions.json';permissions;
Adding Users
/* DO NOT CONFUSE .newUser(); and new User(); THE LATTER WILL CAUSE ERRORS!!*/let userID = "7818"; //id MUST be a string!!let usersFile = './users.json';let permissions = "a" "b"; //in this case a single * permission will worklet roles = ; //roles are coming soon!!permissions;
Loading Permissions/Users
/* LOADING PERMISSIONS AND USERS IS CRUCIAL*/permissions;permissions;
Check for Users Permission to Do X
// make sure users are loaded!! can = permissions) //returns true