Changeset 0.24.2 (#158)
This commit is contained in:
@@ -859,13 +859,30 @@ const (
|
||||
// Group is an access-control list. Decouples resource visibility from teams.
|
||||
type Group struct {
|
||||
BaseModel
|
||||
Name string `json:"name" db:"name"`
|
||||
Description string `json:"description" db:"description"`
|
||||
Scope string `json:"scope" db:"scope"` // global, team
|
||||
TeamID *string `json:"team_id,omitempty" db:"team_id"`
|
||||
CreatedBy string `json:"created_by" db:"created_by"`
|
||||
Source string `json:"source" db:"source"` // manual (default), oidc
|
||||
MemberCount int `json:"member_count,omitempty"` // computed, not a DB column
|
||||
Name string `json:"name" db:"name"`
|
||||
Description string `json:"description" db:"description"`
|
||||
Scope string `json:"scope" db:"scope"` // global, team
|
||||
TeamID *string `json:"team_id,omitempty" db:"team_id"`
|
||||
CreatedBy *string `json:"created_by,omitempty" db:"created_by"`
|
||||
Source string `json:"source" db:"source"` // manual (default), oidc, system
|
||||
Permissions []string `json:"permissions" db:"permissions"`
|
||||
TokenBudgetDaily *int64 `json:"token_budget_daily,omitempty" db:"token_budget_daily"`
|
||||
TokenBudgetMonthly *int64 `json:"token_budget_monthly,omitempty" db:"token_budget_monthly"`
|
||||
AllowedModels []string `json:"allowed_models,omitempty" db:"allowed_models"` // nil = unrestricted
|
||||
MemberCount int `json:"member_count,omitempty"` // computed, not a DB column
|
||||
}
|
||||
|
||||
// GroupPatch holds optional fields for updating a group.
|
||||
type GroupPatch struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Permissions *[]string `json:"permissions,omitempty"`
|
||||
TokenBudgetDaily *int64 `json:"token_budget_daily,omitempty"`
|
||||
TokenBudgetMonthly *int64 `json:"token_budget_monthly,omitempty"`
|
||||
AllowedModels *[]string `json:"allowed_models,omitempty"` // &[]string{} = restrict to none; nil = no change
|
||||
ClearBudgetDaily bool `json:"clear_budget_daily,omitempty"`
|
||||
ClearBudgetMonthly bool `json:"clear_budget_monthly,omitempty"`
|
||||
ClearAllowedModels bool `json:"clear_allowed_models,omitempty"`
|
||||
}
|
||||
|
||||
// GroupMember links a user to a group.
|
||||
|
||||
Reference in New Issue
Block a user