fix: revert regressions from recent integration/releases/app-href changes (#6514)
This commit is contained in:
1 parent
b4fba47a23
commit
778533a62e
11 files changed
+8
-31
No files matched your search
@@ -92,7 +92,7 @@ export const homeRouter = createTRPCRouter({
|
||||
});
|
||||
}
|
||||
|
||||
if (ctx.session?.user.permissions.includes("integration-full-all")) {
|
||||
if (ctx.session?.user.permissions.includes("integration-create")) {
|
||||
statistics.push({
|
||||
titleKey: "integration",
|
||||
subtitleKey: "resources",
|
||||
|
||||
@@ -62,13 +62,12 @@ export const integrationRouter = createTRPCRouter({
|
||||
requiredSecrets: def.secretKinds,
|
||||
}));
|
||||
}),
|
||||
all: permissionRequiredProcedure
|
||||
.requiresPermission("integration-full-all")
|
||||
all: protectedProcedure
|
||||
.meta({
|
||||
mcp: {
|
||||
enabled: true,
|
||||
description:
|
||||
"List all configured integrations (connections to services like Sonarr, Radarr, Plex, etc.). Requires integration-full-all permission. Returns each integration's id, name, kind, url, and permissions. Use the 'id' field as 'integrationId' in other tools. Check permissions.hasUseAccess before reading data and permissions.hasInteractAccess before performing actions — false means the API key owner lacks that permission level for this integration, not an error",
|
||||
"List all configured integrations (connections to services like Sonarr, Radarr, Plex, etc.). Returns each integration's id, name, kind, url, and permissions. Use the 'id' field as 'integrationId' in other tools. Check permissions.hasUseAccess before reading data and permissions.hasInteractAccess before performing actions — false means the API key owner lacks that permission level for this integration, not an error",
|
||||
},
|
||||
})
|
||||
.query(async ({ ctx }) => {
|
||||
@@ -297,7 +296,6 @@ export const integrationRouter = createTRPCRouter({
|
||||
};
|
||||
}),
|
||||
create: permissionRequiredProcedure
|
||||
.requiresPermission("integration-full-all")
|
||||
.requiresPermission("integration-create")
|
||||
.meta({
|
||||
mcp: {
|
||||
|
||||
@@ -104,7 +104,6 @@ export const releasesRouter = createTRPCRouter({
|
||||
id: repositoryId,
|
||||
provider: repository.provider,
|
||||
timestamp: response.timestamp,
|
||||
success: true as const,
|
||||
...response.data,
|
||||
};
|
||||
} catch (error) {
|
||||
|
||||
@@ -119,7 +119,6 @@ export type HomarrDocumentationPath =
|
||||
| "/docs/tags/variables"
|
||||
| "/docs/tags/widgets"
|
||||
| "/docs/advanced/command-line"
|
||||
| "/docs/advanced/command-line/development"
|
||||
| "/docs/advanced/command-line/fix-usernames"
|
||||
| "/docs/advanced/command-line/integrations"
|
||||
| "/docs/advanced/command-line/password-recovery"
|
||||
|
||||
@@ -95,9 +95,7 @@ export const globalCommandGroup = createGroup<Command>({
|
||||
icon: IconPlug,
|
||||
name: tOption("newIntegration.label"),
|
||||
useInteraction: interaction.children(newIntegrationChildrenOptions),
|
||||
hidden:
|
||||
!session?.user.permissions.includes("integration-full-all") ||
|
||||
!session?.user.permissions.includes("integration-create"),
|
||||
hidden: !session?.user.permissions.includes("integration-create"),
|
||||
},
|
||||
{
|
||||
commandKey: "newUser",
|
||||
|
||||
@@ -82,7 +82,7 @@ export const pagesSearchGroup = createGroup<{
|
||||
icon: IconPlug,
|
||||
path: "/manage/integrations",
|
||||
name: t("manageIntegration.label"),
|
||||
hidden: !session?.user.permissions.includes("integration-full-all"),
|
||||
hidden: !session,
|
||||
},
|
||||
{
|
||||
icon: IconSearch,
|
||||
|
||||
@@ -5,10 +5,6 @@ export const appHrefSchema = z
|
||||
.trim()
|
||||
.url()
|
||||
.regex(/^(?!javascript)[a-zA-Z]*:\/\//i) // javascript: is not allowed, i for case insensitive (so Javascript: is also not allowed)
|
||||
.or(z.string().trim().includes("[homarr_base]"))
|
||||
.or(z.string().trim().includes("[homarr_hostname]"))
|
||||
.or(z.string().trim().includes("[homarr_domain]"))
|
||||
.or(z.string().trim().includes("[homarr_protocol]"))
|
||||
.or(z.literal(""))
|
||||
.transform((value) => (value.length === 0 ? null : value))
|
||||
.nullable();
|
||||
|
||||
Reference in new issue
Block a user