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

Fix curator default persona editing #4158

Merged
merged 2 commits into from
Mar 2, 2025
Merged

Conversation

pablonyx
Copy link
Contributor

@pablonyx pablonyx commented Feb 28, 2025

Description

Curators should be able to edit featured assistants if they own them. They should NOT be able to modify the "featured" status

How Has This Been Tested?

[Describe the tests you ran to verify your changes]

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

Copy link

vercel bot commented Feb 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search 🛑 Canceled (Inspect) Feb 28, 2025 7:27pm

user.role == UserRole.CURATOR
or user.role == UserRole.GLOBAL_CURATOR
):
is_default_persona = None
Copy link
Contributor

Choose a reason for hiding this comment

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

it feels like we should have a curator class with behavior like this stored inside instead of trying to reason out the behavior in a bunch of disparate functions.

@@ -428,7 +436,7 @@ def upsert_persona(
remove_image: bool | None = None,
search_start_date: datetime | None = None,
builtin_persona: bool = False,
is_default_persona: bool = False,
is_default_persona: bool | None = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

having persona in the parameter name seems redundant but i suppose this is propagating from other variable names?

@pablonyx pablonyx added this pull request to the merge queue Mar 2, 2025
Merged via the queue into main with commit d473c4e Mar 2, 2025
10 of 12 checks passed
ahmadassaf pushed a commit to BeameryEdge/onyx that referenced this pull request Mar 2, 2025
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