|
@@ -50,6 +50,10 @@ module.exports = async (dbName='shop-roles') => {
|
|
delete: []
|
|
delete: []
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ async getACL(){
|
|
|
|
+ return [this._id.toString(), "user"]
|
|
|
|
+ }
|
|
}
|
|
}
|
|
SlicedSavable.addClass(User)
|
|
SlicedSavable.addClass(User)
|
|
|
|
|
|
@@ -69,6 +73,7 @@ module.exports = async (dbName='shop-roles') => {
|
|
|
|
|
|
|
|
|
|
static async fromFileData(fileData){
|
|
static async fromFileData(fileData){
|
|
|
|
+ if (!fileData) return
|
|
let image = new Image({})
|
|
let image = new Image({})
|
|
image.fileData = fileData
|
|
image.fileData = fileData
|
|
image.url = `images/${fileData.filename}`
|
|
image.url = `images/${fileData.filename}`
|