Skip to content

Commit 9358a58

Browse files
restrict storage access groups for local storage
1 parent dc111b5 commit 9358a58

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
@@ -1513,6 +1513,10 @@ public boolean configureStorageAccess(ConfigureStorageAccessCmd cmd) {
15131513

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

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)