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 django admin cmd for adding explicit plugin access #22172

Merged
merged 1 commit into from May 9, 2024

Conversation

tiina303
Copy link
Contributor

@tiina303 tiina303 commented May 8, 2024

Problem

Want to switch over to using explicit access instead of if org has any plugins that are enabled.
Follow-up to #21680

Thought about adding a UI for this and realised it's only us + support engineers maybe using it and that's too much work for that.

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?

Ran locally

DEBUG=1 python manage.py change_plugin_private_access --organization-id 018e628e-99d7-0000-ff0b-1c5490bdc38f --plugin-id 5 --live-run
2024-05-08 02:29:41 [warning  ] ['锔廍nvironment variable DEBUG is set - PostHog is running in DEVELOPMENT MODE!', 'Be sure to unset DEBUG if this is supposed to be a PRODUCTION ENVIRONMENT!']
/Users/tiina/posthog/posthog2/env/lib/python3.10/site-packages/dlt/common/configuration/specs/base_configuration.py:155: UserWarning: Missing default value for field subdomain on ZendeskCredentialsBase. None assumed. All fields in configspec must have default.
  warnings.warn(
2024-05-08T00:29:45.029100Z [warning  ] Skipping async migrations setup. This is unsafe in production! [posthog.apps] pid=2782 tid=4298851712
2024-05-08T00:29:45.032737Z [info     ] AXES: BEGIN LOG                [axes.apps] pid=2782 tid=4298851712
2024-05-08T00:29:45.033819Z [info     ] AXES: Using django-axes version 5.9.0 [axes.apps] pid=2782 tid=4298851712
2024-05-08T00:29:45.033872Z [info     ] AXES: blocking by IP only.     [axes.apps] pid=2782 tid=4298851712
2024-05-08T00:29:45.458294Z [info     ] Plugin Language URL stripper is currently explicitly allowed for organizations: [] [posthog.management.commands.change_plugin_private_access] pid=2782 tid=4298851712
2024-05-08T00:29:45.461122Z [info     ] Organization host currently has explicit access to plugins: [Taxonomy Plugin] [posthog.management.commands.change_plugin_private_access] pid=2782 tid=4298851712
2024-05-08T00:29:45.461201Z [info     ] Target organization 018e628e-99d7-0000-ff0b-1c5490bdc38f is named host currently does not have access [posthog.management.commands.change_plugin_private_access] pid=2782 tid=4298851712
2024-05-08T00:29:45.466706Z [info     ] Added access                   [posthog.management.commands.change_plugin_private_access] pid=2782 tid=4298851712
(env)

@tiina303 tiina303 requested a review from bretthoerner May 8, 2024 00:32
@tiina303 tiina303 merged commit 6c61467 into master May 9, 2024
79 checks passed
@tiina303 tiina303 deleted the plugins-explicit-access branch May 9, 2024 13:11
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