mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: don't allow "new" or "create" as url-friendly names (#13596)
This commit is contained in:
+4
-4
@@ -18,8 +18,8 @@ const (
|
||||
)
|
||||
|
||||
type CreateGroupRequest struct {
|
||||
Name string `json:"name"`
|
||||
DisplayName string `json:"display_name"`
|
||||
Name string `json:"name" validate:"required,group_name"`
|
||||
DisplayName string `json:"display_name" validate:"omitempty,group_display_name"`
|
||||
AvatarURL string `json:"avatar_url"`
|
||||
QuotaAllowance int `json:"quota_allowance"`
|
||||
}
|
||||
@@ -111,8 +111,8 @@ func (c *Client) Group(ctx context.Context, group uuid.UUID) (Group, error) {
|
||||
type PatchGroupRequest struct {
|
||||
AddUsers []string `json:"add_users"`
|
||||
RemoveUsers []string `json:"remove_users"`
|
||||
Name string `json:"name"`
|
||||
DisplayName *string `json:"display_name"`
|
||||
Name string `json:"name" validate:"omitempty,group_name"`
|
||||
DisplayName *string `json:"display_name" validate:"omitempty,group_display_name"`
|
||||
AvatarURL *string `json:"avatar_url"`
|
||||
QuotaAllowance *int `json:"quota_allowance"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user