add descriptive wording
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<q-tab name="webhooks" label="Web Hooks" />
|
||||
<q-tab name="retention" label="Retention" />
|
||||
<q-tab name="apikeys" label="API Keys" />
|
||||
<q-tab name="sso" label="SSO Integration" />
|
||||
<q-tab name="sso" label="Single Sign-On" />
|
||||
<!-- <q-tab name="openai" label="Open AI" /> -->
|
||||
</q-tabs>
|
||||
</template>
|
||||
|
@@ -6,9 +6,9 @@ For details, see: https://license.tacticalrmm.com/ee
|
||||
|
||||
<template>
|
||||
<q-dialog ref="dialogRef" @hide="onDialogHide">
|
||||
<q-card class="q-dialog-plugin" style="width: 50">
|
||||
<q-card class="q-dialog-plugin" style="width: 35vw; max-width: 35vw">
|
||||
<q-bar>
|
||||
{{ props.provider ? "Edit SSO Provider" : "Add SSO Provider" }}
|
||||
{{ props.provider ? "Edit OIDC Provider" : "Add OIDC Provider" }}
|
||||
<q-space />
|
||||
<q-btn dense flat icon="close" v-close-popup>
|
||||
<q-tooltip class="bg-white text-primary">Close</q-tooltip>
|
||||
@@ -20,22 +20,29 @@ For details, see: https://license.tacticalrmm.com/ee
|
||||
<q-input
|
||||
:readonly="!!props.provider"
|
||||
:disable="!!props.provider"
|
||||
label="Name"
|
||||
label="Provider Name"
|
||||
outlined
|
||||
dense
|
||||
v-model="localProvider.name"
|
||||
:rules="[(val) => !!val || '*Required']"
|
||||
:rules="[
|
||||
(val) => !!val || '*Required',
|
||||
(val) =>
|
||||
/^[a-zA-Z0-9_-]+$/.test(val) ||
|
||||
'Only letters, numbers, hyphens, and underscores are allowed',
|
||||
]"
|
||||
hint="A unique identifier for the SSO provider. Avoid spaces and special characters, as this will be part of the callback URL."
|
||||
/>
|
||||
</q-card-section>
|
||||
|
||||
<!-- url -->
|
||||
<q-card-section>
|
||||
<q-input
|
||||
label="Server URL"
|
||||
label="Issuer URL"
|
||||
outlined
|
||||
dense
|
||||
v-model="localProvider.server_url"
|
||||
:rules="[(val) => !!val || '*Required']"
|
||||
hint="The OpenID Connect Issuer URL provided by the SSO provider. This is typically the base URL where the provider hosts their OIDC configuration."
|
||||
/>
|
||||
</q-card-section>
|
||||
|
||||
@@ -73,7 +80,7 @@ For details, see: https://license.tacticalrmm.com/ee
|
||||
|
||||
<q-card-section>
|
||||
<tactical-dropdown
|
||||
label="Default Role"
|
||||
label="Default User Role"
|
||||
:options="roleOptions"
|
||||
outlined
|
||||
dense
|
||||
@@ -81,7 +88,7 @@ For details, see: https://license.tacticalrmm.com/ee
|
||||
mapOptions
|
||||
filled
|
||||
v-model="localProvider.role"
|
||||
hint="The role to assign the user on first sign-in"
|
||||
hint="The role assigned to users upon first sign-in through this provider."
|
||||
/>
|
||||
</q-card-section>
|
||||
|
||||
|
@@ -14,9 +14,14 @@ For details, see: https://license.tacticalrmm.com/ee
|
||||
color="grey-5"
|
||||
icon="fas fa-plus"
|
||||
text-color="black"
|
||||
label="Add SSO Provider"
|
||||
label="Add OIDC Provider"
|
||||
@click="addSSOProvider"
|
||||
/>
|
||||
:disable="!ssoSettings.sso_enabled"
|
||||
>
|
||||
<q-tooltip v-if="!ssoSettings.sso_enabled" class="text-caption"
|
||||
>Enable SSO in the settings to allow adding a provider.</q-tooltip
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
<q-separator />
|
||||
<q-table
|
||||
@@ -29,7 +34,7 @@ For details, see: https://license.tacticalrmm.com/ee
|
||||
hide-pagination
|
||||
virtual-scroll
|
||||
:rows-per-page-options="[0]"
|
||||
no-data-label="No SSO Providers added yet"
|
||||
no-data-label="No OIDC Providers added yet"
|
||||
:loading="loading"
|
||||
>
|
||||
<template v-slot:top>
|
||||
@@ -127,7 +132,11 @@ For details, see: https://license.tacticalrmm.com/ee
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useStore } from "vuex";
|
||||
import { QTableColumn, useQuasar, copyToClipboard } from "quasar";
|
||||
import { fetchSSOProviders, removeSSOProvider } from "@/ee/sso/api/sso";
|
||||
import {
|
||||
fetchSSOProviders,
|
||||
removeSSOProvider,
|
||||
fetchSSOSettings,
|
||||
} from "@/ee/sso/api/sso";
|
||||
import { notifySuccess } from "@/utils/notify";
|
||||
import { truncateText } from "@/utils/format";
|
||||
import { getBaseUrl } from "@/boot/axios";
|
||||
@@ -147,6 +156,7 @@ const store = useStore();
|
||||
|
||||
const loading = ref(false);
|
||||
const providers = ref([] as SSOProvider[]);
|
||||
const ssoSettings = ref({} as SSOSettingsType);
|
||||
|
||||
const columns: QTableColumn[] = [
|
||||
{
|
||||
@@ -178,6 +188,14 @@ const columns: QTableColumn[] = [
|
||||
},
|
||||
];
|
||||
|
||||
async function getSSOSettings() {
|
||||
try {
|
||||
ssoSettings.value = await fetchSSOSettings();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
async function getSSOProviders() {
|
||||
loading.value = true;
|
||||
try {
|
||||
@@ -232,12 +250,17 @@ function getCallbackURL(provider: SSOProvider) {
|
||||
function openSSOSettings() {
|
||||
$q.dialog({
|
||||
component: SSOSettings,
|
||||
}).onOk((ssoSettings: SSOSettingsType) => {
|
||||
store.commit("setBlockLocalUserLogon", ssoSettings.block_local_user_logon);
|
||||
}).onOk((updatedSSOSettings: SSOSettingsType) => {
|
||||
store.commit(
|
||||
"setBlockLocalUserLogon",
|
||||
updatedSSOSettings.block_local_user_logon,
|
||||
);
|
||||
ssoSettings.value = { ...updatedSSOSettings };
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await getSSOSettings();
|
||||
await getSSOProviders();
|
||||
});
|
||||
</script>
|
||||
|
@@ -28,10 +28,16 @@ For details, see: https://license.tacticalrmm.com/ee
|
||||
<q-card-section>
|
||||
<q-checkbox
|
||||
dense
|
||||
label="Block Local Logon"
|
||||
label="Block Local User Login"
|
||||
v-model="ssoSettings.block_local_user_logon"
|
||||
:disable="!ssoSettings.sso_enabled"
|
||||
/>
|
||||
hint="When enabled, only users with SSO accounts can log in, with the exception of local superuser accounts."
|
||||
>
|
||||
<q-tooltip class="text-caption"
|
||||
>When enabled, only users with SSO accounts can log in, with the
|
||||
exception of local superuser accounts.</q-tooltip
|
||||
>
|
||||
</q-checkbox>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions align="right">
|
||||
@@ -52,7 +58,7 @@ For details, see: https://license.tacticalrmm.com/ee
|
||||
// composition imports
|
||||
import { ref, watch, onMounted } from "vue";
|
||||
import { useDialogPluginComponent } from "quasar";
|
||||
import { notifySuccess } from "@/utils/notify";
|
||||
import { notifySuccess, notifyWarning } from "@/utils/notify";
|
||||
import { fetchSSOSettings, updateSSOSettings } from "@/ee/sso/api/sso";
|
||||
|
||||
// types
|
||||
@@ -83,6 +89,9 @@ async function submit() {
|
||||
notifySuccess("Settings updated successfully");
|
||||
onDialogOK(ssoSettings.value);
|
||||
} catch (e) {
|
||||
if (e.status === 423) {
|
||||
notifyWarning(e.response.data, 7000);
|
||||
}
|
||||
console.error(e);
|
||||
}
|
||||
loading.value = false;
|
||||
|
Reference in New Issue
Block a user