feat(cloud-console): add user authentication and administration
This commit is contained in:
@@ -7,6 +7,8 @@ import type {
|
||||
PluginRecord,
|
||||
} from "../types";
|
||||
|
||||
defineProps<{ canAdmin?: boolean }>();
|
||||
|
||||
const loading = ref(false);
|
||||
const errorMessage = ref("");
|
||||
const plugins = ref<PluginRecord[]>([]);
|
||||
@@ -99,7 +101,7 @@ onMounted(refresh);
|
||||
<RefreshCw :size="14" />
|
||||
Refresh
|
||||
</button>
|
||||
<button class="primary" @click="showForm = !showForm">
|
||||
<button v-if="canAdmin" class="primary" @click="showForm = !showForm">
|
||||
<Plus :size="14" />
|
||||
{{ showForm ? "Close form" : "Register plugin" }}
|
||||
</button>
|
||||
@@ -111,7 +113,7 @@ onMounted(refresh);
|
||||
<div v-if="errorMessage" class="notice error">{{ errorMessage }}</div>
|
||||
<div v-if="formSuccess" class="notice success">{{ formSuccess }}</div>
|
||||
|
||||
<div class="panel" v-if="showForm">
|
||||
<div class="panel" v-if="showForm && canAdmin">
|
||||
<h3>Register a plugin</h3>
|
||||
<p class="dim">
|
||||
The cloud api requires the <code>plugins:admin</code> scope for this
|
||||
|
||||
Reference in New Issue
Block a user