Skip to content

Commit

Permalink
feat(oauth): send feature flag to frontend (#80120)
Browse files Browse the repository at this point in the history
There's no org [where this feature flag is being
checked](https://github.com/getsentry/getsentry/blob/master/static/getsentry/gsAdmin/views/instanceLevelOAuth/components/newInstanceLevelOAuthClient.tsx#L24)
so enabling it through the config. This basically makes it available in
the Config object on the frontend
  • Loading branch information
sentaur-athena authored Nov 1, 2024
1 parent 859cfdd commit 9aca4b6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/sentry/features/temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,3 +584,11 @@ def register_temporary_features(manager: FeatureManager):
FeatureHandlerStrategy.FLAGPOLE,
api_expose=True,
)

# Partner oauth
manager.add(
"organizations:scoped-partner-oauth",
OrganizationFeature,
FeatureHandlerStrategy.FLAGPOLE,
api_expose=False,
)
7 changes: 7 additions & 0 deletions src/sentry/web/client_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,13 @@ def enabled_features(self) -> Iterable[str]:
yield "relocation:enabled"
if features.has("system:multi-region"):
yield "system:multi-region"
# TODO @athena: remove this feature flag after development is done
# this is a temporary hack to be able to used flagpole in a case where there's no organization
# availble on the frontend
if self.last_org and features.has(
"organizations:scoped-partner-oauth", self.last_org, actor=self.user
):
yield "system:scoped-partner-oauth"

@property
def needs_upgrade(self) -> bool:
Expand Down

0 comments on commit 9aca4b6

Please sign in to comment.