fix(site): distinguish cross-org budgets - #28596
Conversation
3e1722c to
68687d9
Compare
EhabY
left a comment
There was a problem hiding this comment.
Smol naming comments and a question, but otherwise looks good!
There was a problem hiding this comment.
Is this actually ever reached? Do we have a test for other and otherOrganization?
There was a problem hiding this comment.
Yes, it’s reached when another group in the same organization is effective. UI behavior is covered by the NotAttributed and NotAttributedOtherOrganization stories.
| onClick={onManageAIBudget} | ||
| disabled={budgetFromOtherGroup} | ||
| disabled={budgetFromOtherOrganization} |
There was a problem hiding this comment.
So now we can manage other groups within the same org?
Ah tests do say that
There was a problem hiding this comment.
We always supported changing a user's budget from another group. In fact, we also support changing it from another org, as long as the user belongs to the target group and the caller can update both the user and that group. However, in the UI we want to keep org-scope concerns visible, and showing this information depending on these conditions would be more complex. However, since most cases will happen in the context of the same org, I think this is a nice addition 🙂
Description
Group member budget actions were disabled whenever another group governed the member's budget, including groups in the same organization.
Distinguish same-organization and cross-organization effective groups so administrators can manage overrides from any same-org group page. Keep the action disabled when the effective group belongs to another organization.
Changes
otherOrganizationeffective-group classification.Note
Generated by Coder Agents on behalf of @ssncferreira.