Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for upload permission based on google group #4562

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

pgrace-google
Copy link
Collaborator

Although the IssueTracker component create controls are locked down to this group, its possible for folks to accidentally migrate bugs into this component. To prevent that from happening, check for the reporter's membership before proceeding with the upload. It is a bit hacky i admit.

@@ -31,6 +32,15 @@
ISSUETRACKER_WONTFIX_STATE = 'NOT_REPRODUCIBLE'


def has_vrp_upload_permission(reporter):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How often is this going to be called? Maybe we should cache this in redis?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking of running the cron job every 5 min or so, but it should only need to be called when we have submissions, which would depend on the usage of it

but 1. good call - i was being stupid and calling it for each check, but i should update this to be at least just one call for each cron job run lol

and 2. redis sounds like also a good plan! ill do that in a separate CL -ive added a todo for me!!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redis probably not needed then. Thanks for fixing.

Copy link
Collaborator

@jonathanmetzman jonathanmetzman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jonathanmetzman jonathanmetzman merged commit 8c3f0f2 into google:master Jan 10, 2025
7 checks passed
vitorguidi added a commit that referenced this pull request Jan 23, 2025
Merging #4562 to branch
'chrome'

Co-authored-by: Vitor Guidi <[email protected]>
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