mirror of
https://github.com/AzuraCast/AzuraCast.git
synced 2024-06-13 12:46:41 +00:00
51 lines
1.8 KiB
Vue
51 lines
1.8 KiB
Vue
<template>
|
|
<b-tab :title="$gettext('Global Permissions')" active>
|
|
<b-form-group>
|
|
<div class="form-row">
|
|
<b-wrapped-form-group class="col-md-12" id="edit_form_name" :field="form.name">
|
|
<template #label>
|
|
{{ $gettext('Role Name') }}
|
|
</template>
|
|
</b-wrapped-form-group>
|
|
|
|
<b-wrapped-form-group class="col-md-12" id="edit_form_global_permissions"
|
|
:field="form.permissions.global">
|
|
<template #label>
|
|
{{ $gettext('Global Permissions') }}
|
|
</template>
|
|
<template #description>
|
|
{{
|
|
$gettext('Users with this role will have these permissions across the entire installation.')
|
|
}}
|
|
</template>
|
|
<template #default="props">
|
|
<b-form-checkbox-group :id="props.id" :options="globalPermissionOptions"
|
|
v-model="props.field.$model">
|
|
</b-form-checkbox-group>
|
|
</template>
|
|
</b-wrapped-form-group>
|
|
</div>
|
|
</b-form-group>
|
|
</b-tab>
|
|
</template>
|
|
|
|
<script setup>
|
|
import BWrappedFormGroup from "~/components/Form/BWrappedFormGroup";
|
|
import _ from 'lodash';
|
|
import {computed} from "vue";
|
|
|
|
const props = defineProps({
|
|
form: Object,
|
|
globalPermissions: Object
|
|
});
|
|
|
|
const globalPermissionOptions = computed(() => {
|
|
return _.map(props.globalPermissions, (permissionName, permissionKey) => {
|
|
return {
|
|
text: permissionName,
|
|
value: permissionKey
|
|
};
|
|
});
|
|
});
|
|
</script>
|