mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-21 12:00:02 +00:00
Add server config to disable user registered agents (#4206)
This commit is contained in:
@@ -8,6 +8,7 @@ declare global {
|
||||
WOODPECKER_CSRF: string | undefined;
|
||||
WOODPECKER_ROOT_PATH: string | undefined;
|
||||
WOODPECKER_ENABLE_SWAGGER: boolean | undefined;
|
||||
WOODPECKER_USER_REGISTERED_AGENTS: boolean | undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +19,5 @@ export default () => ({
|
||||
csrf: window.WOODPECKER_CSRF ?? null,
|
||||
rootPath: window.WOODPECKER_ROOT_PATH ?? '',
|
||||
enableSwagger: window.WOODPECKER_ENABLE_SWAGGER === true || false,
|
||||
userRegisteredAgents: window.WOODPECKER_USER_REGISTERED_AGENTS || false,
|
||||
});
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<Tab id="cli-and-api" :title="$t('user.settings.cli_and_api.cli_and_api')">
|
||||
<UserCLIAndAPITab />
|
||||
</Tab>
|
||||
<Tab id="agents" :title="$t('admin.settings.agents.agents')">
|
||||
<Tab v-if="useConfig().userRegisteredAgents" id="agents" :title="$t('admin.settings.agents.agents')">
|
||||
<UserAgentsTab />
|
||||
</Tab>
|
||||
</Scaffold>
|
||||
|
@@ -19,7 +19,7 @@
|
||||
<OrgRegistriesTab />
|
||||
</Tab>
|
||||
|
||||
<Tab id="agents" :title="$t('admin.settings.agents.agents')">
|
||||
<Tab v-if="useConfig().userRegisteredAgents" id="agents" :title="$t('admin.settings.agents.agents')">
|
||||
<OrgAgentsTab />
|
||||
</Tab>
|
||||
</Scaffold>
|
||||
@@ -35,6 +35,7 @@ import Tab from '~/components/layout/scaffold/Tab.vue';
|
||||
import OrgAgentsTab from '~/components/org/settings/OrgAgentsTab.vue';
|
||||
import OrgRegistriesTab from '~/components/org/settings/OrgRegistriesTab.vue';
|
||||
import OrgSecretsTab from '~/components/org/settings/OrgSecretsTab.vue';
|
||||
import useConfig from '~/compositions/useConfig';
|
||||
import { inject } from '~/compositions/useInjectProvide';
|
||||
import useNotifications from '~/compositions/useNotifications';
|
||||
import { useRouteBack } from '~/compositions/useRouteBack';
|
||||
|
Reference in New Issue
Block a user