mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 18:43:26 +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")
|
||||
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)." +
|
||||
" If this parameter is not specified during the creation of the role its value will be defaulted to true (public).")
|
||||
@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.")
|
||||
private boolean publicRole = true;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@ -23,7 +23,7 @@ export default {
|
||||
docHelp: 'adminguide/accounts.html#roles',
|
||||
permission: ['listRoles', 'listRolePermissions'],
|
||||
columns: ['name', 'type', 'description'],
|
||||
details: ['name', 'id', 'type', 'description'],
|
||||
details: ['name', 'id', 'type', 'description', 'ispublic'],
|
||||
tabs: [{
|
||||
name: 'details',
|
||||
component: shallowRef(defineAsyncComponent(() => import('@/components/view/DetailsTab.vue')))
|
||||
@ -53,7 +53,7 @@ export default {
|
||||
icon: 'edit-outlined',
|
||||
label: 'label.edit.role',
|
||||
dataView: true,
|
||||
args: ['name', 'description', 'type'],
|
||||
args: ['name', 'description', 'type', 'ispublic'],
|
||||
mapping: {
|
||||
type: {
|
||||
options: ['Admin', 'DomainAdmin', 'User']
|
||||
|
||||
@ -99,6 +99,13 @@
|
||||
</a-select>
|
||||
</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">
|
||||
<a-button @click="closeAction">{{ $t('label.cancel') }}</a-button>
|
||||
<a-button :loading="loading" ref="submit" type="primary" @click="handleSubmit">{{ $t('label.ok') }}</a-button>
|
||||
@ -150,7 +157,8 @@ export default {
|
||||
initForm () {
|
||||
this.formRef = ref()
|
||||
this.form = reactive({
|
||||
using: 'type'
|
||||
using: 'type',
|
||||
ispublic: true
|
||||
})
|
||||
this.rules = reactive({
|
||||
name: [{ required: true, message: this.$t('message.error.required.input') }],
|
||||
|
||||
@ -80,6 +80,13 @@
|
||||
</a-select>
|
||||
</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">
|
||||
<template #label>
|
||||
<tooltip-label :title="$t('label.forced')" :tooltip="apiParams.forced.description"/>
|
||||
@ -124,7 +131,7 @@ export default {
|
||||
methods: {
|
||||
initForm () {
|
||||
this.formRef = ref()
|
||||
this.form = reactive({})
|
||||
this.form = reactive({ ispublic: true })
|
||||
this.rules = reactive({
|
||||
file: [
|
||||
{ required: true, message: this.$t('message.error.required.input') },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user