Skip to content

Add accessGroupObjs field to User#21

Open
2Ryan09 wants to merge 4 commits into
mainfrom
add-access-group-obj-to-user
Open

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

Conversation

@2Ryan09
Copy link
Copy Markdown
Contributor

@2Ryan09 2Ryan09 commented May 26, 2026

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
Copy link
Copy Markdown

amithmslac commented May 27, 2026

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
Copy link
Copy Markdown
Contributor Author

2Ryan09 commented May 27, 2026

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"}' ]
    }
  }
}

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