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: () => {}
}
}
-
Notifications
You must be signed in to change notification settings - Fork 1
LSK Auth module
License
lskjs/lsk-auth
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
LSK Auth module
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published