|
16 | 16 | }
|
17 | 17 | ```
|
18 | 18 |
|
| 19 | +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. |
| 20 | + |
19 | 21 | ### Properties
|
20 | 22 |
|
21 |
| -| Name | Type | Required | Restrictions | Description | |
22 |
| -| -------- | ------------------------------------------------------------ | -------- | ------------ | ----------- | |
23 |
| -| `action` | string | false | none | none | |
24 |
| -| `object` | [codersdk.AuthorizationObject](#codersdkauthorizationobject) | false | none | none | |
| 23 | +| Name | Type | Required | Restrictions | Description | |
| 24 | +| -------- | ------------------------------------------------------------ | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 25 | +| `action` | string | false | none | none | |
| 26 | +| `object` | [codersdk.AuthorizationObject](#codersdkauthorizationobject) | false | none | Object can represent a "set" of objects, such as: all workspaces in an organization, all workspaces owned by me, all workspaces across the entire product. | |
25 | 27 |
|
26 | 28 | #### Enumerated Values
|
27 | 29 |
|
|
43 | 45 | }
|
44 | 46 | ```
|
45 | 47 |
|
| 48 | +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. |
| 49 | + |
46 | 50 | ### Properties
|
47 | 51 |
|
48 | 52 | | Name | Type | Required | Restrictions | Description |
|
49 | 53 | | ----------------- | ------ | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
50 |
| -| `organization_id` | string | false | none | Organization ID (optional) adds the set constraint to all resources owned by a given organization. | |
| 54 | +| `organization_id` | string | false | none | Organization id (optional) adds the set constraint to all resources owned by a given organization. | |
51 | 55 | | `owner_id` | string | false | none | Owner id (optional) adds the set constraint to all resources owned by a given user. |
|
52 | 56 | | `resource_id` | string | false | none | Resource id (optional) reduces the set to a singular resource. This assigns<br>a resource ID to the resource type, eg: a single workspace.<br>The rbac library will not fetch the resource from the database, so if you<br>are using this option, you should also set the `OwnerID` and `OrganizationID`<br>if possible. Be as specific as possible using all the fields relevant. |
|
53 | 57 | | `resource_type` | string | false | none | Resource type is the name of the resource.<br>`./coderd/rbac/object.go` has the list of valid resource types. |
|
|
84 | 88 | | Name | Type | Required | Restrictions | Description |
|
85 | 89 | | ------------------ | ---------------------------------------------------------- | -------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
86 | 90 | | `checks` | object | false | none | Checks is a map keyed with an arbitrary string to a permission check.<br>The key can be any string that is helpful to the caller, and allows<br>multiple permission checks to be run in a single request.<br>The key ensures that each permission check has the same key in the<br>response. |
|
87 |
| -| » `[any property]` | [codersdk.AuthorizationCheck](#codersdkauthorizationcheck) | false | none | none | |
| 91 | +| » `[any property]` | [codersdk.AuthorizationCheck](#codersdkauthorizationcheck) | false | none | » **additionalproperties** is used to check if the currently authenticated user (or the specified user) can do a given action to a given set of objects. | |
88 | 92 |
|
89 | 93 | ## codersdk.AuthorizationResponse
|
90 | 94 |
|
|
0 commit comments