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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Plugin Private Access control to model #21680

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

tiina303
Copy link
Contributor

Problem

We currently determine access based on if a non deleted plugin_config exists in the organization, that's annoying to use for allowing private plugin access and it makes deprecating plugins more complex too.

Changes

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

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

How did you test this code?

@tiina303 tiina303 requested review from a team and Twixes April 19, 2024 13:54
# Sometimes we want to test out new plugins by only enabling them for certain organizations at first
class PluginPrivateAccess(models.Model):
plugin: models.ForeignKey = models.ForeignKey("Plugin", on_delete=models.CASCADE)
organization: models.ForeignKey = models.ForeignKey("Organization", on_delete=models.CASCADE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Django has ManyToManyField for this, it could be a field on the Plugin model.

I don't have a strong opinion, just pointing it out. :)

@tiina303 tiina303 changed the title feat: Add Plugin Private Access model feat: Add Plugin Private Access control to modal Apr 19, 2024
@tiina303 tiina303 changed the title feat: Add Plugin Private Access control to modal feat: Add Plugin Private Access control to model Apr 19, 2024
@tiina303 tiina303 merged commit 910f011 into master Apr 19, 2024
103 checks passed
@tiina303 tiina303 deleted the private-plugin-access-control branch April 19, 2024 14:55
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.

None yet

2 participants