-
Notifications
You must be signed in to change notification settings - Fork 3
Add changes to billing plans #623
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
Conversation
…om personal workspace
…dd is_admin to AppUser
…ve share modal logic from BasePage to dedicated workflow_share module - Improve code organization and reusability - Add proper type hints and docstrings - Maintain all existing functionality including team/personal workspace sharing
…re button rendering to workflow_share module - Add null checks for user in permission checks - Make workspace_id and user parameters optional in share button - Simplify permission methods in bots/models
- Rename PublishedRunPermission to WorkflowAccessLevel for better clarity - Update permission levels to VIEW_ONLY, FIND_AND_VIEW, and EDIT - Rename visibility/team_permission fields to public_access/workspace_access - Update all related methods and references across the codebase - Maintain hierarchical relationship: VIEW_ONLY < FIND_AND_VIEW < EDIT
0d7afbb
to
e25c416
Compare
…s different from published workspace
Adds a membership check to ensure users with EDIT access level must be members of the workspace. This prevents edge cases where users might have EDIT access but no actual workspace membership. The change modifies the access control logic in WorkflowAccessLevel to require both EDIT access level AND workspace membership, in addition to the existing checks for PR creators and workspace admins.
50bf367
to
b4224a1
Compare
needs GooeyAI/gooey-gui#54 to work now |
daras_ai_v2/base.py
Outdated
pr, selected_workspace=selected_workspace | ||
) | ||
with gui.div(className="mt-4 mt-lg-0 text-end"): | ||
if user_can_edit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
publish form should not say "save" if selected workspace is different from published workspace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the behavior in the code. it is checked for in can_user_edit_published_run
where we check selected_workspace.id == published_run.workspace_id
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you were testing from an admin account?
daras_ai_v2/base.py
Outdated
and self.can_user_edit_published_run(self.current_pr) | ||
and ( | ||
self.is_current_user_admin() | ||
or self.current_workspace.id == self.current_pr.workspace_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
broke all pages for anonymous uses
daras_ai_v2/base.py
Outdated
self.request.user | ||
and selected_workspace.id == published_run.workspace_id | ||
and ( | ||
published_run.team_permission == PublishedRunPermission.CAN_EDIT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allows non-members to save published run if the team permission is set to EDIT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't because on like 490, we check for selected_workspace.id == published_run.workspace_id
?
Q/A checklist
You can visualize this using tuna:
To measure import time for a specific library:
To reduce import times, import libraries that take a long time inside the functions that use them instead of at the top of the file:
Legal Boilerplate
Look, I get it. The entity doing business as “Gooey.AI” and/or “Dara.network” was incorporated in the State of Delaware in 2020 as Dara Network Inc. and is gonna need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Dara Network Inc can use, modify, copy, and redistribute my contributions, under its choice of terms.