Skip to content

Add accessGroupObjs field to User#21

Merged
2Ryan09 merged 4 commits into
mainfrom
add-access-group-obj-to-user
Jun 1, 2026
Merged

Add accessGroupObjs field to User#21
2Ryan09 merged 4 commits into
mainfrom
add-access-group-obj-to-user

Conversation

@2Ryan09

@2Ryan09 2Ryan09 commented May 26, 2026

Copy link
Copy Markdown
Contributor

Use case: get all gidNumbers associated with a User

@2Ryan09
2Ryan09 marked this pull request as ready for review May 27, 2026 17:01
@2Ryan09
2Ryan09 requested a review from amithmslac May 27, 2026 17:01
@amithmslac

amithmslac commented May 27, 2026

Copy link
Copy Markdown
Contributor

I wonder if we can make this cleaner and change the User model to hold the gidnumbers a user has instead of having to iterate over all the repos and its posixGroup feature to obtain this on every query

@2Ryan09

2Ryan09 commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

I wonder if we can make this cleaner and change the User model to hold the gidnumbers a user has instead of having to iterate over all the repos and its posixGroup feature to obtain this on every query

Hmmmm I'm open to suggestions, but ultimately within the mongo "schema" the source of truth for gidNumber is nested in the Repo objects, e.g.:

{
  _id: ObjectId('69fbbabcdbe84cdcdd00179f'),
  name: 'CA180',
  features: {
    slurm: { state: true, options: [] },
    posixgroup: {
      state: true,
      options: [ '{"name": "sdf-cryoem-ca180", "gidNumber": "4936"}' ]
    }
  }
}

@2Ryan09
2Ryan09 merged commit b6f7274 into main Jun 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants