Skip to content

Feature: Dataset-level Authorisation #233

Description

@SikandarEjaz

Implement dataset-level authorisation in the CITYdata using metadata-driven access control.

Requirements

  • Associate each dataset with a metadata file stored in src/test/resources
  • Metadata file format:
    • First line: dataset type (Public, Protected, or Private)
    • Following lines: usernames authorized to access the dataset
  • Implement authorisation logic to:
    • Validate the authenticated user
    • Read the corresponding metadata file
    • Check if the username is authorized
    • Grant or deny access accordingly

Test Setup

Create:

  • 3 datasets (public, protected, private)
  • 3 corresponding metadata files

Dataset contents should contain access confirmation messages (e.g., “You have access to Public dataset”).

Unit Tests
Add tests for each dataset covering:

Positive cases

  • Authorised user successfully accesses dataset

Negative cases

  • Unauthorised user is denied access with an appropriate error/exception

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions