Skip to content

Add authentication and authorization to template endpoints #70

@coderabbitai

Description

@coderabbitai

Description

Add authentication and authorization checks to template API endpoints to ensure only authorized users can perform operations like deletion.

Context

During review of PR #67, it was identified that the template endpoints lack proper authorization checks. A TODO was added to address this in a future PR.

Scope

  • Implement authentication middleware or decorators for template endpoints
  • Add authorization checks for the DELETE /template.delete endpoint to verify:
    • User is authenticated
    • User is authorized to delete the template (owner or admin)
  • Review and secure other template endpoints as needed (POST /template.create, POST /template.materialize, etc.)

Security Impact

Without authorization, any authenticated user could potentially delete templates they don't own, which is a security concern.

References

Requested by

@odaiodeh

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions