An open API service indexing awesome lists of open source software.

https://github.com/lskjs/lsk-auth

LSK Auth module
https://github.com/lskjs/lsk-auth

authentication isomorphic javascript lsk module nodejs react universal

Last synced: 2 months ago
JSON representation

LSK Auth module

Awesome Lists containing this project

README

          

# LSK Auth

# достал из chat.server.js

```js
Message.getRole(userId) -> owner
Message.is('owner') // ?
Message.roles = {
owner: {
read: ['title', 'createdAt'], // all
write: ['user, 'owner'] // info
}
guest: {
read: ['title', 'createdAt'], // all
write: ['user, 'owner'] // null
}
validate params
1) OWNER
2) Public

Message.isOwner = (userId) => { this.ownerId } ['content']
Message.canWrite = ['content']
MEssage.canWrite = ['content']

schema = {
title: {
canWrite: () => {}
}
}
```