Skip to content

docs: applications and authorization #5477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix: description
  • Loading branch information
mtojek committed Dec 21, 2022
commit 74de5d459f8bb14622865a9897766fd2959e19c9
8 changes: 6 additions & 2 deletions codersdk/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ type AuthorizationRequest struct {
Checks map[string]AuthorizationCheck `json:"checks"`
}

// @Description AuthorizationCheck is used to check if the currently authenticated user (or
// @Description the specified user) can do a given action to a given set of objects.
// AuthorizationCheck is used to check if the currently authenticated user (or the specified user) can do a given action to a given set of objects.
//
// @Description AuthorizationCheck is used to check if the currently authenticated user (or the specified user) can do a given action to a given set of objects.
type AuthorizationCheck struct {
// Object can represent a "set" of objects, such as:
// - All workspaces in an organization
Expand All @@ -37,6 +38,9 @@ type AuthorizationCheck struct {
Action string `json:"action" enums:"create,read,update,delete"`
}

// AuthorizationObject can represent a "set" of objects, such as: all workspaces in an organization, all workspaces owned by me,
// all workspaces across the entire product.
//
// @Description AuthorizationObject can represent a "set" of objects, such as: all workspaces in an organization, all workspaces owned by me,
// @Description all workspaces across the entire product.
type AuthorizationObject struct {
Expand Down
2 changes: 1 addition & 1 deletion scripts/apidocgen/markdown-template/parameters.def
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

|Name|In|Type|Required|Description|
|---|---|---|---|---|
{{~ data.parameters :p}}|{{=p.name}}|{{=p.in}}|{{= renderParameterType(p)}}|{{=p.required}}|{{=p.shortDesc || 'none'}}|
{{~ data.parameters :p}}|{{=p.name}}|{{=p.in}}|{{= renderParameterType(p)}}|{{=p.required}}|{{=p.shortDesc||''}}|
{{~}}

{{? data.longDescs }}
Expand Down