Remove unused permission to reset users' E2E key (#15860)
parent
f9d3d2cab4
commit
3c4f4b0105
@ -0,0 +1,16 @@ |
||||
import { Migrations } from '../../../app/migrations/server'; |
||||
import { Permissions } from '../../../app/models/server'; |
||||
|
||||
Migrations.add({ |
||||
version: 168, |
||||
up() { |
||||
const perm = Permissions.findOne({ _id: 'reset-other-user-e2e-key' }); |
||||
|
||||
if (perm) { |
||||
Permissions.remove({ _id: 'reset-other-user-e2e-key' }); |
||||
} |
||||
}, |
||||
down() { |
||||
Permissions.upsert({ _id: 'reset-other-user-e2e-key' }, { _id: 'reset-other-user-e2e-key', roles: ['admin'] }); |
||||
}, |
||||
}); |
Loading…
Reference in new issue