UNPKG

publication-igid

Version:

Authorization gateway relying on an auth service for providing user editing interfaces

47 lines (38 loc) 1.24 kB
// const { GeneralStatic } = require('copious-transitions') const myStorageClass = require('./custom_static') class PublicationStatic extends GeneralStatic { // constructor() { super(myStorageClass) } initialize(db_obj,conf) { super.initialize(db_obj,conf) this.publication_application_initialize() } // publication_application_initialize() { /* let users = this.db.all_keys('user') users.forEach(user => { let [static_dash,dash_info] = this. _user_static_descriptors(user) this.db.put_static_store(static_dash,dash_info,"application/json") }) this.db.static_synchronizer((user) => { let [static_dash,dash_info] = this. _user_static_descriptors(user) //[static_dash,dash_info] }) */ } _user_static_descriptors(user_id) { let static_dash = 'publication+' + user_id let publication_characteristics = { 'owner' : user_id, 'date' : ('' + Date.now()), 'panel_key' : generate_password(), 'which_publication' : 'test publication' } return [static_dash,JSON.stringify(publication_characteristics)] } } module.exports = new PublicationStatic()