Skip to content

Commit dc4b173

Browse files
restrict storage access groups for local storage
1 parent 12fb59c commit dc4b173

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

server/src/main/java/com/cloud/storage/StorageManagerImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,6 +1514,10 @@ public boolean configureStorageAccess(ConfigureStorageAccessCmd cmd) {
15141514

15151515
if (storagePoolId != null) {
15161516
StoragePoolVO storagePool = _storagePoolDao.findById(storagePoolId);
1517+
if (ScopeType.HOST.equals(storagePool.getScope())) {
1518+
throw new CloudRuntimeException("Storage Access Groups are not suitable for local storage");
1519+
}
1520+
15171521
if (logger.isDebugEnabled()) {
15181522
logger.debug("Updating Storage Pool Access Group Maps to :" + storageAccessGroups);
15191523
}

ui/src/views/infra/UpdatePrimaryStorage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
v-focus="true" />
8585
</a-form-item>
8686

87-
<a-form-item name="storageaccessgroups" ref="storageaccessgroups">
87+
<a-form-item name="storageaccessgroups" ref="storageaccessgroups" v-if="resource.scope !== 'HOST'">
8888
<template #label>
8989
<tooltip-label :title="$t('label.storageaccessgroups')" :tooltip="apiParamsConfigureStorageAccess.storageaccessgroups.description"/>
9090
</template>

0 commit comments

Comments
 (0)