added option *generateUserId* in abstract connector

This commit is contained in:
Kevin Jahns
2017-03-06 13:27:04 +01:00
parent 922637930f
commit f996ac83d2
3 changed files with 18 additions and 10 deletions

View File

@@ -59,6 +59,9 @@ module.exports = function (Y/* :any */) {
this.protocolVersion = 11
this.authInfo = opts.auth || null
this.checkAuth = opts.checkAuth || function () { return Promise.resolve('write') } // default is everyone has write access
if (opts.generateUserId === true) {
this.setUserId(Y.utils.generateGuid())
}
}
resetAuth (auth) {
if (this.authInfo !== auth) {