Skip to content

[OPIK-4360] [FE] Implement view datasets permission check#5439

Merged
anastasiapyzhik merged 21 commits intomainfrom
nastassia/OPIK-4360/view-dataset-permission
Mar 2, 2026
Merged

[OPIK-4360] [FE] Implement view datasets permission check#5439
anastasiapyzhik merged 21 commits intomainfrom
nastassia/OPIK-4360/view-dataset-permission

Conversation

@anastasiapyzhik
Copy link
Contributor

@anastasiapyzhik anastasiapyzhik commented Feb 27, 2026

Details

This PR implements comprehensive permission checks for the VIEW_DATASET permission across the frontend. Most notably, users without dataset viewing permissions can no longer access experiments at all, since experiments are fundamentally tied to datasets. This includes hiding the experiments page, sidebar navigation, and all experiment-related features. Additionally, dataset-specific functionality (optimizations, playground dataset selection, "Add to Dataset" actions) is also hidden or disabled based on permissions.

Key changes:

  • Experiments are now hidden when users lack VIEW_DATASET permission (experiments are intrinsically linked to datasets)
  • Added canViewDatasets permission to the frontend permission system with cascading effects on experiments
  • Created DatasetsPageGuard component to restrict access to the datasets page
  • Conditionally hide datasets and experiments from sidebar navigation based on permissions
  • Disabled dataset selection in optimizations and playground when permission is missing
  • Hidden "Add to Dataset" dropdown option and dataset-related experiment filters
  • Hidden experiment filtering/grouping options in various contexts

Screenshots

Permission ON (dataset_view: true) Permission OFF (dataset_view: false)
Sidebar: Datasets menu item visible Sidebar: Datasets menu item hidden
Datasets page: Can view datasets Datasets page: Page is not available
Screenshot 2026-02-27 at 10 52 54 Screenshot 2026-02-27 at 10 53 39
"Add to" functionality: Dataset option is visible "Add to" functionality: Dataset option is hidden
Screenshot 2026-02-27 at 11 11 56 Screenshot 2026-02-27 at 11 12 25
Screenshot 2026-02-27 at 11 13 25 Screenshot 2026-02-27 at 11 14 06
Screenshot 2026-02-27 at 11 15 50 Screenshot 2026-02-27 at 11 16 28
Screenshot 2026-02-27 at 11 20 56 Screenshot 2026-02-27 at 11 21 35
Playground: Can select dataset Playground: Can not select dataset
Screenshot 2026-02-27 at 12 02 56 Screenshot 2026-02-27 at 12 03 24
Optimization studio: Optimization runs are grouped by dataset Optimization studio: Optimization runs shown as a flat list
Optimization studio: Optimization runs filtering is available Optimization studio: Optimization runs filtering is not available
Screenshot 2026-02-27 at 12 05 35 Screenshot 2026-03-02 at 12 16 48

Change checklist

  • User facing
  • Documentation update

Issues

  • Resolves #
  • OPIK-4360

Testing

Frontend Permission Checks:

  • Manually tested with and without VIEW_DATASET permission:
    • Experiments page access blocked when lacking dataset permission
    • Experiments hidden from sidebar navigation when lacking dataset permission
    • ✅ Datasets page access blocked via guard component
    • ✅ Datasets hidden from sidebar navigation
    • ✅ Dataset filtering/grouping disabled in experiments pages
    • ✅ Dataset selection disabled in Add Optimization dialog
    • ✅ Dataset selection hidden in Playground output actions
    • ✅ "Add to Dataset" option hidden from trace dropdown
    • ✅ Dataset references hidden in Compare Trials page
    • ✅ Optimizations page correctly handles dataset-related permissions
    • ✅ Verified both permissions (canViewExperiments && canViewDatasets) enforced

Documentation

  • No additional documentation required (follows existing permission system patterns)

@github-actions

This comment was marked as resolved.

@github-actions

This comment was marked as resolved.

1 similar comment
@github-actions
Copy link
Contributor

📋 PR Linter Failed

Missing Section. The description is missing the ## Details section.


Missing Section. The description is missing the ## Change checklist section.


Missing Section. The description is missing the ## Issues section.


Missing Section. The description is missing the ## Testing section.


Missing Section. The description is missing the ## Documentation section.

@github-actions

This comment was marked as resolved.

@github-actions

This comment was marked as resolved.

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📋 PR Linter Failed

Missing Section. The description is missing the ## Details section.


Missing Section. The description is missing the ## Change checklist section.


Missing Section. The description is missing the ## Issues section.


Missing Section. The description is missing the ## Testing section.


Missing Section. The description is missing the ## Documentation section.

@github-actions

This comment was marked as resolved.

@github-actions

This comment was marked as resolved.

@github-actions

This comment was marked as resolved.

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📋 PR Linter Failed

Missing Section. The description is missing the ## Details section.


Missing Section. The description is missing the ## Change checklist section.


Missing Section. The description is missing the ## Issues section.


Missing Section. The description is missing the ## Testing section.


Missing Section. The description is missing the ## Documentation section.

@github-actions

This comment was marked as resolved.

@github-actions

This comment was marked as resolved.

@anastasiapyzhik anastasiapyzhik marked this pull request as ready for review March 2, 2026 11:53
@anastasiapyzhik anastasiapyzhik requested a review from a team as a code owner March 2, 2026 11:53
@anastasiapyzhik anastasiapyzhik requested a review from a team March 2, 2026 11:54
@anastasiapyzhik anastasiapyzhik added the test-environment Deploy Opik adhoc environment label Mar 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

🔄 Test environment deployment process has started

Phase 1: Deploying base version 1.10.24-4356 (from main branch) if environment doesn't exist
Phase 2: Building new images from PR branch nastassia/OPIK-4360/view-dataset-permission
Phase 3: Will deploy newly built version after build completes

You can monitor the progress here.

@CometActions
Copy link
Collaborator

Test environment is now available!

To configure additional Environment variables for your environment, run [Deploy Opik AdHoc Environment workflow] (https://github.com/comet-ml/comet-deployment/actions/workflows/deploy_opik_adhoc_env.yaml)

Access Information

The deployment has completed successfully and the version has been verified.

@anastasiapyzhik anastasiapyzhik merged commit b9c5402 into main Mar 2, 2026
30 of 31 checks passed
@anastasiapyzhik anastasiapyzhik deleted the nastassia/OPIK-4360/view-dataset-permission branch March 2, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend test-environment Deploy Opik adhoc environment typescript *.ts *.tsx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants