mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: expose Everyone group through UI (#9117)
- Allows setting quota allowances on the 'Everyone' group.
This commit is contained in:
@@ -11,6 +11,18 @@ export const everyOneGroup = (organizationId: string): Group => ({
|
||||
source: "user",
|
||||
})
|
||||
|
||||
/**
|
||||
* Returns true if the provided group is the 'Everyone' group.
|
||||
* The everyone group represents all the users in an organization
|
||||
* for which every organization member is implicitly a member of.
|
||||
*
|
||||
* @param {Group} group - The group to evaluate.
|
||||
* @returns {boolean} - Returns true if the group's ID matches its
|
||||
* organization ID.
|
||||
*/
|
||||
export const isEveryoneGroup = (group: Group): boolean =>
|
||||
group.id === group.organization_id
|
||||
|
||||
export const getGroupSubtitle = (group: Group): string => {
|
||||
// It is the everyone group when a group id is the same of the org id
|
||||
if (group.id === group.organization_id) {
|
||||
|
||||
Reference in New Issue
Block a user