Skip to content

fix(Dataset): allow public dataset access in v4 findById endpoint for unauthenticated users#2764

Closed
abdimo101 wants to merge 1 commit into
masterfrom
fix-dataset-v4-public-read
Closed

fix(Dataset): allow public dataset access in v4 findById endpoint for unauthenticated users#2764
abdimo101 wants to merge 1 commit into
masterfrom
fix-dataset-v4-public-read

Conversation

@abdimo101
Copy link
Copy Markdown
Member

@abdimo101 abdimo101 commented May 28, 2026

Description

This PR allows unauthenticated users to access published datasets through the V4 findById endpoint. The @CheckPolicies decorator now checks for both DatasetRead and DatasetReadOnePublic permissions just like in the V3 findById .

Motivation

Fixes

  • Bug fixed (#X)

Changes:

  • changes made

Tests included

  • Included for each change/fix?
  • Passing?

Documentation

  • swagger documentation updated (required for API changes)
  • official documentation updated

official documentation info

Summary by Sourcery

Bug Fixes:

  • Fix v4 dataset findById authorization to permit access to publicly published datasets without authentication, consistent with v3 behavior.

@abdimo101 abdimo101 requested a review from a team as a code owner May 28, 2026 12:04
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@abdimo101 abdimo101 requested review from Junjiequan and nitrosx May 28, 2026 12:06
Copy link
Copy Markdown
Member

@HayenNico HayenNico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @abdimo101,
the DatasetReadOnePublic action/permission is only granted to unauthenticated users, who are forbidden from using any endpoints in datasets.v4.controller.ts by design. An unauthenticated user should use the /api/v4/datasets/public endpoints defined in datasets-public.v4.controller.ts instead

@abdimo101 abdimo101 closed this May 28, 2026
@Junjiequan Junjiequan deleted the fix-dataset-v4-public-read branch May 28, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants