Skip to content

feat(shotgrid): support PROJECT_ALLOWED_TYPES filtering - #262

Merged
jspada200 merged 3 commits into
AcademySoftwareFoundation:mainfrom
KrishnaAdityaSrivastava:feat/shotgrid-project-allowed-types
Nov 21, 2026
Merged

jspada200 merged 3 commits into
AcademySoftwareFoundation:mainfrom
KrishnaAdityaSrivastava:feat/shotgrid-project-allowed-types

Conversation

@KrishnaAdityaSrivastava

@KrishnaAdityaSrivastava KrishnaAdityaSrivastava commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds support for filtering ShotGrid projects by project type using the PROJECT_ALLOWED_TYPES environment variable.

When PROJECT_ALLOWED_TYPES is set (for example, Commercial,Feature), get_projects_for_user() adds an sg_type filter to the ShotGrid query so that only projects whose sg_type matches one of the configured values are returned. When the environment variable is unset or empty, the existing behavior is preserved.

Also adds unit tests covering:

  • No PROJECT_ALLOWED_TYPES configured.
  • A single allowed project type.
  • Multiple allowed project types.
  • Whitespace trimming and empty entry handling.

Testing

  • I have tested these changes locally
  • I have run all relevant automated tests
  • I have verified this does not break existing

How I Tested

  • Set PROJECT_ALLOWED_TYPES to different values and verified the generated ShotGrid filters through unit tests.
  • Verified behavior when the environment variable is unset.
  • Verified support for multiple comma-separated project types.
  • Verified whitespace is trimmed and empty entries are ignored.
  • Ran the backend test suite:

Fixes #254

@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: KrishnaAdityaSrivastava / name: KrishnaAdityaSrivastava (b1e9d11)

@jspada200
jspada200 self-requested a review November 2, 2026 15:12
@jspada200 jspada200 added enhancement New feature or request Backend Work Associated with the backend labels Nov 2, 2026
@jspada200

Copy link
Copy Markdown
Collaborator

Looks good @KrishnaAdityaSrivastava ! Can you document this new variable here? https://github.com/AcademySoftwareFoundation/dna/blob/main/QUICKSTART.md

Thanks!

@jspada200 jspada200 added the awaiting merge This MR was reviewed but has conflicts or pipeline issues. label Nov 2, 2026
@KrishnaAdityaSrivastava
KrishnaAdityaSrivastava force-pushed the feat/shotgrid-project-allowed-types branch from 6ee33e7 to 8164326 Compare November 3, 2026 06:09
@jspada200 jspada200 removed the awaiting merge This MR was reviewed but has conflicts or pipeline issues. label Nov 18, 2026
@jspada200

Copy link
Copy Markdown
Collaborator

Sothing got a little messed up on this branch. Let me know if you need help to wrap this up.

Signed-off-by: KrishnaAdityaSrivastava <krishnaadityasrivastava@gmail.com>
Signed-off-by: KrishnaAdityaSrivastava <krishnaadityasrivastava@gmail.com>
@KrishnaAdityaSrivastava
KrishnaAdityaSrivastava force-pushed the feat/shotgrid-project-allowed-types branch from 22cb3c6 to 6220b62 Compare November 19, 2026 05:51
@KrishnaAdityaSrivastava

Copy link
Copy Markdown
Contributor Author

Hey, I fixed the branch. Some unrelated commits had accidentally crept in when I updated it. I have cleaned it up and added the QUICKSTART.md documentation as well. The PR is now back to just the intended changes. Thanks for pointing it out!

@jspada200
jspada200 merged commit f40a19f into AcademySoftwareFoundation:main Nov 21, 2026
4 checks passed
@jspada200

Copy link
Copy Markdown
Collaborator

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Work Associated with the backend enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shotgrid: Add env var to configure project types for users

2 participants