(p codersdk.Permission)
| 282 | } |
| 283 | |
| 284 | func sdkPermissionToDB(p codersdk.Permission) database.CustomRolePermission { |
| 285 | return database.CustomRolePermission{ |
| 286 | Negate: p.Negate, |
| 287 | ResourceType: string(p.ResourceType), |
| 288 | Action: policy.Action(p.Action), |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | func validOrganizationRoleRequest(ctx context.Context, req codersdk.CustomRoleRequest, rw http.ResponseWriter) bool { |
| 293 | // This check is not ideal, but we cannot enforce a unique role name in the db against |