mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-17 02:53:18 +01:00
role ispublic param on UI (#7973)
Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
This commit is contained in:
parent
b2b707b90e
commit
9c4d18f9b1
@ -48,8 +48,7 @@ public class CreateRoleCmd extends RoleCmd {
|
|||||||
description = "ID of the role to be cloned from. Either roleid or type must be passed in")
|
description = "ID of the role to be cloned from. Either roleid or type must be passed in")
|
||||||
private Long roleId;
|
private Long roleId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "Indicates whether the role will be visible to all users (public) or only to root admins (private)." +
|
@Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "Indicates whether the role will be visible to all users (public) or only to root admins (private). Default is true.")
|
||||||
" If this parameter is not specified during the creation of the role its value will be defaulted to true (public).")
|
|
||||||
private boolean publicRole = true;
|
private boolean publicRole = true;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|||||||
@ -23,7 +23,7 @@ export default {
|
|||||||
docHelp: 'adminguide/accounts.html#roles',
|
docHelp: 'adminguide/accounts.html#roles',
|
||||||
permission: ['listRoles', 'listRolePermissions'],
|
permission: ['listRoles', 'listRolePermissions'],
|
||||||
columns: ['name', 'type', 'description'],
|
columns: ['name', 'type', 'description'],
|
||||||
details: ['name', 'id', 'type', 'description'],
|
details: ['name', 'id', 'type', 'description', 'ispublic'],
|
||||||
tabs: [{
|
tabs: [{
|
||||||
name: 'details',
|
name: 'details',
|
||||||
component: shallowRef(defineAsyncComponent(() => import('@/components/view/DetailsTab.vue')))
|
component: shallowRef(defineAsyncComponent(() => import('@/components/view/DetailsTab.vue')))
|
||||||
@ -53,7 +53,7 @@ export default {
|
|||||||
icon: 'edit-outlined',
|
icon: 'edit-outlined',
|
||||||
label: 'label.edit.role',
|
label: 'label.edit.role',
|
||||||
dataView: true,
|
dataView: true,
|
||||||
args: ['name', 'description', 'type'],
|
args: ['name', 'description', 'type', 'ispublic'],
|
||||||
mapping: {
|
mapping: {
|
||||||
type: {
|
type: {
|
||||||
options: ['Admin', 'DomainAdmin', 'User']
|
options: ['Admin', 'DomainAdmin', 'User']
|
||||||
|
|||||||
@ -99,6 +99,13 @@
|
|||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
|
<a-form-item name="ispublic" ref="ispublic">
|
||||||
|
<template #label>
|
||||||
|
<tooltip-label :title="$t('label.ispublic')" :tooltip="apiParams.ispublic.description"/>
|
||||||
|
</template>
|
||||||
|
<a-switch v-model:checked="form.ispublic"/>
|
||||||
|
</a-form-item>
|
||||||
|
|
||||||
<div :span="24" class="action-button">
|
<div :span="24" class="action-button">
|
||||||
<a-button @click="closeAction">{{ $t('label.cancel') }}</a-button>
|
<a-button @click="closeAction">{{ $t('label.cancel') }}</a-button>
|
||||||
<a-button :loading="loading" ref="submit" type="primary" @click="handleSubmit">{{ $t('label.ok') }}</a-button>
|
<a-button :loading="loading" ref="submit" type="primary" @click="handleSubmit">{{ $t('label.ok') }}</a-button>
|
||||||
@ -150,7 +157,8 @@ export default {
|
|||||||
initForm () {
|
initForm () {
|
||||||
this.formRef = ref()
|
this.formRef = ref()
|
||||||
this.form = reactive({
|
this.form = reactive({
|
||||||
using: 'type'
|
using: 'type',
|
||||||
|
ispublic: true
|
||||||
})
|
})
|
||||||
this.rules = reactive({
|
this.rules = reactive({
|
||||||
name: [{ required: true, message: this.$t('message.error.required.input') }],
|
name: [{ required: true, message: this.$t('message.error.required.input') }],
|
||||||
|
|||||||
@ -80,6 +80,13 @@
|
|||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
|
<a-form-item name="ispublic" ref="ispublic">
|
||||||
|
<template #label>
|
||||||
|
<tooltip-label :title="$t('label.ispublic')" :tooltip="apiParams.ispublic.description"/>
|
||||||
|
</template>
|
||||||
|
<a-switch v-model:checked="form.ispublic"/>
|
||||||
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item name="forced" ref="forced">
|
<a-form-item name="forced" ref="forced">
|
||||||
<template #label>
|
<template #label>
|
||||||
<tooltip-label :title="$t('label.forced')" :tooltip="apiParams.forced.description"/>
|
<tooltip-label :title="$t('label.forced')" :tooltip="apiParams.forced.description"/>
|
||||||
@ -124,7 +131,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
initForm () {
|
initForm () {
|
||||||
this.formRef = ref()
|
this.formRef = ref()
|
||||||
this.form = reactive({})
|
this.form = reactive({ ispublic: true })
|
||||||
this.rules = reactive({
|
this.rules = reactive({
|
||||||
file: [
|
file: [
|
||||||
{ required: true, message: this.$t('message.error.required.input') },
|
{ required: true, message: this.$t('message.error.required.input') },
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user