|
|
@ -41,6 +41,13 @@ export class PermissionHandler { |
|
|
|
|
|
|
|
|
|
|
|
constructor () { |
|
|
|
constructor () { |
|
|
|
this.permissions = this._getFromLocal() |
|
|
|
this.permissions = this._getFromLocal() |
|
|
|
|
|
|
|
this.currentVersion = 1 |
|
|
|
|
|
|
|
// here we remove the old permissions saved before adding 'permissionVersion'
|
|
|
|
|
|
|
|
// since with v1 the structure has been changed because of new engine ^0.2.0-alpha.6 changes
|
|
|
|
|
|
|
|
if (!localStorage.getItem('permissionVersion')) { |
|
|
|
|
|
|
|
localStorage.setItem('plugins/permissions', '') |
|
|
|
|
|
|
|
localStorage.setItem('permissionVersion', this.currentVersion) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_getFromLocal () { |
|
|
|
_getFromLocal () { |
|
|
|