Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| }, | ||
| }); | ||
|
|
||
| if (!userEventType) |
There was a problem hiding this comment.
We also need to consider team event types here. A user can activate workflows on team event types
There was a problem hiding this comment.
Maybe this help. I think we do the same here: https://github.com/calcom/cal.com/blob/53d160e49539eaab5395a6fe51d1d7ec03c0c62e/packages/trpc/server/routers/viewer/workflows.tsx#L301
There was a problem hiding this comment.
That user should still be under the users field for team event types, right? Won't this consider that? If the user is not a part of that team event type, I don't think they should be able to edit workflows
There was a problem hiding this comment.
Currently, any user of a team can set workflows active on a team event type. So we also would need to adapt that in the workflow editing page (multi-dropdown). But we can do that in a follow-up PR
There was a problem hiding this comment.
@joeauyeung While I do think you're suggestion is very reasonable and makes sense, I think we need a proper top-down approach to permissions with users. ie we need roles of people who can edit (admins) and those that can't (members). Until we implement that, I don't think there's a benefit to having specific rules where people can edit some things but not others, as it will be difficult to track what people can and can't do for both our customers and us.
What does this PR do?
Misc fixes
Fixes # (issue)
Environment: Staging(main branch) / Production
Type of change
How should this be tested?
Checklist