Skip to content

feat: replace VocabularyScope enum with Path-based scope hierarchy #236

@mdproctor

Description

@mdproctor

Background

Evaluation in #190 concluded that VocabularyScope (GLOBAL/ORG/TEAM/PERSONAL enum) should be replaced with Path-based scope using isAncestorOf() instead of ordinal comparison. SettingsScope from casehub-platform-api is not the right target — it carries Instant effectiveAt semantics irrelevant here — but Path directly is the right type.

What needs to change

  • LabelVocabulary.scope: VocabularyScope enum → Path (with PathAttributeConverter)
  • isScopeAccessible(VocabularyScope, VocabularyScope)isAccessibleFrom(Path callerPath) using Path.isAncestorOf()
  • REST API: scope path param changes from GLOBAL/ORG/TEAM/PERSONAL strings to explicit path strings
  • Flyway migration: convert existing enum values (GLOBAL → root, ORG/TEAM/PERSONAL → segment-based paths)
  • Delete VocabularyScope enum

Scale: M · Med

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity: LowClear path, no unknownsscale: MMulti-class / multi-file

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions