fix: fix the policy of image

Use alias policy to distinguish upload_image of glance and cinder

Change-Id: I72cf15c3c4a2d31b50d96a643a9a134f8d2db2ab
This commit is contained in:
xusongfu 2022-07-19 10:07:07 +08:00
parent d3ffb6264d
commit 5cf020aaca
2 changed files with 2 additions and 1 deletions

View File

@ -66,6 +66,8 @@ export class CreateForm extends FormAction {
static policy = ['add_image', 'upload_image']; static policy = ['add_image', 'upload_image'];
static aliasPolicy = ['glance:add_image', 'glance:upload_image'];
static allowed() { static allowed() {
return Promise.resolve(true); return Promise.resolve(true);
} }

View File

@ -28,7 +28,6 @@ export const policyMap = {
glance: [ glance: [
'get_image', 'get_image',
'add_image', 'add_image',
'upload_image',
'delete_image', 'delete_image',
'modify_image', 'modify_image',
'get_members', 'get_members',