Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

access-manager

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

access-manager - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

2

package.json
{
"name": "access-manager",
"version": "1.0.6",
"version": "1.0.7",
"description": "A one-stop solution for implementing authenticated and anonymous continuous sessions with user handling and whitelisted acl.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -16,3 +16,3 @@ # access-manager

Use the switch when you start your app with access manager for the first time. (Note that your app will shut down once the import is done.)
If you want some example data or wish to import your ACL from file, use the --import-acl switch when you start your app with access manager (for the first time). Note that your app will shut down once the import is done.

@@ -31,3 +31,5 @@ Use example data: (example-acl.json)

The ACL data installs into the acl collection. _Obviously you're free to populate the acl collection anyway you see fit._
## Examples:

@@ -159,23 +161,37 @@

The schemas used in access manager must contain the properties detailed below. (If you don't supply your own schemas these are the defaults)
The schemas used in access manager must contain the properties detailed below. If you don't supply your own schemas these are the defaults:
The userSchema must have the properties:
_The mininum required userSchema:_
"email" (string),
"password" (string)
"roles" (array of strings)
```javascript
{
email: {type: String, required:true, unique:true},
password: {type: String, required:true},
roles: [String]
}
```
The sessionSchema must have the properties:
_The mininum required sessionSchema:_
"loggedIn" (bool)
"user" (reference)
```javascript
{
loggedIn: {type:Boolean, default:false},
user: { type: this.mongoose.Schema.Types.ObjectId, ref: 'User' }
}
```
The aclSchema must have the properties:
_The mininum required aclSchema:_
"path" (string)
"roles" (array of child schema containing):
"role (string)
"methods (array of string with enum:
['GET', 'POST', 'PUT', 'DELETE', 'ALL'])
```javascript
{
path: {type: String, unique: true},
roles: [
new this.mongoose.Schema({
role: String,
methods: [{type: String, enum: ['GET', 'POST', 'PUT', 'DELETE', 'ALL']}]
})
]
}
```
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