Repository navigation
Closed
Description
Current Behavior
When a user is approved, they are automatically added as a collaborator to ALL dataset repos. This causes:
- 100+ invitation emails if there are 100 datasets
- Access to private datasets they shouldn't see
- Unnecessary permissions
Proposed Workflows
Workflow 1: Metadata-only changes (NO collaborator needed)
For users who want to fix TSV files, JSON metadata, documentation, etc.
User GitHub Admin
│ │ │
│ Fork public repo │ │
├─────────────────────────────────>│ │
│ │ │
│ Edit metadata files locally │ │
│ (TSV, JSON, README, etc.) │ │
│ │ │
│ Push to fork │ │
├─────────────────────────────────>│ │
│ │ │
│ Create PR from fork │ │
├─────────────────────────────────>│ │
│ ├─────────────────────────────>│
│ │ Review & merge PR │
│ │<─────────────────────────────┤
No NEMAR account needed - just a GitHub account.
Workflow 2: Data changes (collaborator access required)
For users who need to upload/modify actual data files (EDF, BDF, etc.) via git-annex.
User NEMAR API Admin
│ │ │
│ nemar dataset request-access │ │
│ <dataset-id> │ │
├─────────────────────────────────>│ │
│ │ Create access request │
│ │ Notify admin │
│ ├─────────────────────────────>│
│ │ │
│ │ nemar admin grant-access │
│ │ <username> <dataset-id> │
│ │<─────────────────────────────┤
│ │ │
│ Added as collaborator │ │
│<─────────────────────────────────┤ │
│ │ │
│ Can now push data via git-annex │ │
Implementation Plan
Phase 1: Remove auto-add (immediate)
- Remove
addCollaboratorToAllRepos()from approval endpoint - Remove
removeCollaboratorFromAllRepos()from revoke endpoint
Phase 2: Per-dataset access request
- Add
dataset_access_requeststable - Add
POST /datasets/:id/request-accessendpoint - Add
nemar dataset request-access <dataset-id>CLI command - Add
nemar admin grant-access <username> <dataset-id>CLI command - Add
nemar admin pending-requeststo list access requests
Phase 3: Notifications
- Email admin when access requested
- Email user when access granted/denied
Questions to Resolve
- Should we track which datasets a user has access to in our DB, or just rely on GitHub?
- Should access requests require a reason/justification?
- Should we support revoking access from specific datasets?
Priority
High - current behavior sends spam and grants excessive permissions
Metadata
Metadata
Assignees
Labels
No labels
Activity
fix: surface JSON parse + git errors in version readers
test: cover isWorkingTreeDirty / resolveUpstreamRef / readLocalDatase…
style: drop redundant JSDoc on new helpers
Add --resume, --update, and BIDS entity filters to dataset download (#…
Address review: jq error handling, fallback alarm, value-correctness …
Phase 4: incremental hallu sync via latest_version on listing (#415)