Skip to content

Commit 75fe2ab

Browse files
committed
chore: fix some small groups and acl typos
1 parent 0b82f41 commit 75fe2ab

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

codersdk/groups.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type Group struct {
3636
// even if the user is not authorized to read group member details.
3737
// May be greater than `len(Group.Members)`.
3838
TotalMemberCount int `json:"total_member_count"`
39-
AvatarURL string `json:"avatar_url"`
39+
AvatarURL string `json:"avatar_url,omitempty" format:"uri"`
4040
QuotaAllowance int `json:"quota_allowance"`
4141
Source GroupSource `json:"source"`
4242
OrganizationName string `json:"organization_name"`

codersdk/templates.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ type TemplateUser struct {
194194
type UpdateTemplateACL struct {
195195
// UserPerms should be a mapping of user id to role. The user id must be the
196196
// uuid of the user, not a username or email address.
197-
UserPerms map[string]TemplateRole `json:"user_perms,omitempty" example:"<group_id>:admin,4df59e74-c027-470b-ab4d-cbba8963a5e9:use"`
197+
UserPerms map[string]TemplateRole `json:"user_perms,omitempty" example:"<user_id>:admin,4df59e74-c027-470b-ab4d-cbba8963a5e9:use"`
198198
// GroupPerms should be a mapping of group id to role.
199-
GroupPerms map[string]TemplateRole `json:"group_perms,omitempty" example:"<user_id>>:admin,8bd26b20-f3e8-48be-a903-46bb920cf671:use"`
199+
GroupPerms map[string]TemplateRole `json:"group_perms,omitempty" example:"<group_id>:admin,8bd26b20-f3e8-48be-a903-46bb920cf671:use"`
200200
}
201201

202202
// ACLAvailable is a list of users and groups that can be added to a template

enterprise/coderd/templates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (api *API) templateAvailablePermissions(rw http.ResponseWriter, r *http.Req
9999
// @Produce json
100100
// @Tags Enterprise
101101
// @Param template path string true "Template ID" format(uuid)
102-
// @Success 200 {array} codersdk.TemplateUser
102+
// @Success 200 {object} codersdk.TemplateACL
103103
// @Router /templates/{template}/acl [get]
104104
func (api *API) templateACL(rw http.ResponseWriter, r *http.Request) {
105105
var (

0 commit comments

Comments
 (0)