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

feat: [1/2] access control capture (without test) #27031

Closed
wants to merge 6 commits into from

Conversation

surbhi-posthog
Copy link
Contributor

Problem

We want to capture logs when the user toggles on/off access control feature under teams.

Remaining features include:

  • SSO enforcement which is turned on after verifying a domain.
  • Project permissions - so if someone toggles project private/public
  • Ingestion taxonomy - if someone marks events as verified
  • White label branding - surveys and sharing dashboards

Changes

Changes only add logs in the backend, no frontend changes

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

Cloud: Yes

How did you test this code?

Locally verified that the activity monitor showed the events and add tests
image

@surbhi-posthog surbhi-posthog changed the title access control capture and test feat: access control capture and test Dec 18, 2024
@surbhi-posthog surbhi-posthog marked this pull request as ready for review December 19, 2024 16:26
@surbhi-posthog
Copy link
Contributor Author

I see the failing test - I think I need mock the API calls for user permissions being changes first before checking if the capture is called. Will spend more time debugging this, but if anyone has suggestions please let me know!

@surbhi-posthog
Copy link
Contributor Author

Since the tests were failing on origin and cannot be debugged locally, I'm separating the tests and capture log changes. I will add the tests in the following PR and follow up on it.

@surbhi-posthog surbhi-posthog changed the title feat: access control capture and test feat [1/2]: access control capture and test Dec 23, 2024
@surbhi-posthog surbhi-posthog changed the title feat [1/2]: access control capture and test feat: [1/2] access control capture and test Dec 23, 2024
@surbhi-posthog surbhi-posthog changed the title feat: [1/2] access control capture and test feat: [1/2] access control capture (without test) Dec 23, 2024
Copy link
Contributor

@patricio-posthog patricio-posthog left a comment

Choose a reason for hiding this comment

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

Let's add tests to this asap

Copy link
Contributor

@zlwaterfield zlwaterfield left a comment

Choose a reason for hiding this comment

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

Sorry I didn't mean to approve. I thought about this more and we should get the test working on this PR. It should be possible. I'll try and debug it later in the week.

@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week. If you want to permanentely keep it open, use the waiting label.

@surbhi-posthog
Copy link
Contributor Author

im closing this PR and will follow up changes through this PR https://github.com/PostHog/posthog/actions/runs/12551899005/job/34997145853?pr=27142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants