Add app install form validation for ACL and subdomain
This commit is contained in:
@@ -32,8 +32,19 @@ const dialog = useTemplateRef('dialogHandle');
|
||||
const locationInput = useTemplateRef('locationInput');
|
||||
const description = computed(() => marked.parse(manifest.value.description || ''));
|
||||
const domains = ref([]);
|
||||
|
||||
const formValid = computed(() => {
|
||||
if (!domain.value) return false;
|
||||
|
||||
if (location.value) {
|
||||
// label validation
|
||||
if (location.value.split('.').some(function (p) { return p.length > 63 || p.length < 1; })) return false;
|
||||
if (location.value.match(/^[A-Za-z0-9-.]+$/) === null) return false;
|
||||
if (/^[-.]/.test(location.value)) return false;
|
||||
}
|
||||
|
||||
if (accessRestrictionOption.value === ACL_OPTIONS.RESTRICTED && (accessRestrictionAcl.value.users.length === 0 && accessRestrictionAcl.value.groups.length === 0)) return false;
|
||||
|
||||
if (manifest.value.id === PROXY_APP_ID) {
|
||||
try {
|
||||
new URL(upstreamUri.value);
|
||||
|
||||
Reference in New Issue
Block a user