jfrog_update_permission_target
Modify permission targets in the JFrog Platform to adjust user and group access rights for resources like artifacts, release bundles, and builds. Define specific actions and patterns.
Instructions
Update an existing permission target in the JFrog platform
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the permission target to update | |
| target | Yes |
Implementation Reference
- tools/permissions.ts:211-214 (handler)Handler function for the 'jfrog_update_permission_target' tool. Destructures args into name and target, reconstructs the full permission target object, and calls the underlying updatePermissionTarget API function.handler: async (args: any) => { const { name, target } = args; return await updatePermissionTarget(name, { name, ...target }); }
- tools/permissions.ts:91-97 (helper)Core helper function that performs the actual HTTP PUT request to the JFrog API to update a permission target.export async function updatePermissionTarget(name: string, permissionTarget: z.infer<typeof PermissionTargetSchema>) { const response = await jfrogRequest(`/access/api/v2/permissions/${name}`, { method: "PUT", body: permissionTarget }); return PermissionTargetSchema.parse(response); }
- tools/permissions.ts:45-54 (schema)Zod schema definition for PermissionTarget, used in the tool's input schema (target field omits name).const PermissionTargetSchema = z.object({ name: z.string(), resources: z.object({ artifact: ArtifactResourceSchema.optional(), release_bundle: ReleaseBundleResourceSchema.optional(), build: BuildResourceSchema.optional() }), created_by: z.string().optional(), modified_by: z.string().optional() });
- tools/permissions.ts:206-209 (schema)Input schema for the 'jfrog_update_permission_target' tool, specifying name and partial target.inputSchema: zodToJsonSchema(z.object({ name: z.string().describe("The name of the permission target to update"), target: PermissionTargetSchema.omit({ name: true }) })),
- tools/permissions.ts:288-298 (registration)Local registration of the tool as 'updatePermissionTargetTool' in the PermissionsTools array, which is later imported and spread into the global tools list.export const PermissionsTools = [ listPermissionTargetsTool, getPermissionTargetTool, createPermissionTargetTool, updatePermissionTargetTool, deletePermissionTargetTool, getPermissionResourceTool, updatePermissionResourceTool, replacePermissionResourceTool, deletePermissionResourceTool ];
- tools/index.ts:13-23 (registration)Global registration of all tools, including spread of PermissionsTools which contains 'jfrog_update_permission_target'.export const tools =[ ...RepositoryTools, ...BuildsTools, ...RuntimeTools, ...AccessTools, ...AQLTools, ...CatalogTools, ...CurationTools, ...PermissionsTools, ...ArtifactSecurityTools, ];