feat(licenses): package repo scope UI — assign packages to specific repos #395

Open
opened 2026-06-01 10:01:14 +00:00 by jmiller · 1 comment
Owner

Summary

The RepoScope field on LicensePackage exists (TEXT, default 'all') but is always set to 'all'. Need UI to let admins scope a package to:

  • All repos in the org
  • A single specific repo
  • Multiple selected repos

Requirements

  • Dropdown/multiselect in create and edit package forms
  • List org repos for selection
  • Store as JSON array of repo IDs, or 'all'
  • ValidateLicenseKey should check if the repo requesting validation is in scope

Test Plan

  • Create package scoped to single repo → key only works for that repo's update feed
  • Create package scoped to 'all' → key works for all repos
  • Create package scoped to 2 repos → key works for both but not others
  • Edit package scope → changes apply immediately

🤖 Generated with Claude Code

## Summary The `RepoScope` field on LicensePackage exists (TEXT, default 'all') but is always set to 'all'. Need UI to let admins scope a package to: - All repos in the org - A single specific repo - Multiple selected repos ## Requirements - Dropdown/multiselect in create and edit package forms - List org repos for selection - Store as JSON array of repo IDs, or 'all' - ValidateLicenseKey should check if the repo requesting validation is in scope ## Test Plan - [ ] Create package scoped to single repo → key only works for that repo's update feed - [ ] Create package scoped to 'all' → key works for all repos - [ ] Create package scoped to 2 repos → key works for both but not others - [ ] Edit package scope → changes apply immediately 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

Testing Plan — Package Repo Scope

API

  • Create package with repo_scope="all" → key validates for any repo in org
  • Create package with repo_scope=[repoID] → key only validates for that repo's update feed
  • Create package with repo_scope=[id1,id2] → key validates for both repos
  • Validate key on out-of-scope repo → rejected
  • Edit package scope → changes apply immediately

GUI

  • Repo scope selector in create package form (dropdown/multiselect)
  • Shows org repos for selection
  • "All repos" option (default)
  • Edit package form shows current scope selection
  • Scope displayed in packages table

🤖 Generated with Claude Code

## Testing Plan — Package Repo Scope ### API - [ ] Create package with repo_scope="all" → key validates for any repo in org - [ ] Create package with repo_scope=[repoID] → key only validates for that repo's update feed - [ ] Create package with repo_scope=[id1,id2] → key validates for both repos - [ ] Validate key on out-of-scope repo → rejected - [ ] Edit package scope → changes apply immediately ### GUI - [ ] Repo scope selector in create package form (dropdown/multiselect) - [ ] Shows org repos for selection - [ ] "All repos" option (default) - [ ] Edit package form shows current scope selection - [ ] Scope displayed in packages table 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jmiller added the pending: testing label 2026-06-01 10:13:56 +00:00
Sign in to join this conversation.
No labels pending: testing
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoGitea#395