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