feat: add an organization member permission level (#19953)

This commit is contained in:
ケイラ
2025-10-27 17:14:16 -06:00
committed by GitHub
parent c3cbd977f1
commit 4f7b279fd8
23 changed files with 612 additions and 305 deletions
+8
View File
@@ -311,5 +311,13 @@ func validOrganizationRoleRequest(ctx context.Context, req codersdk.CustomRoleRe
return false
}
if len(req.OrganizationMemberPermissions) > 0 {
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
Message: "Invalid request, not allowed to assign organization member permissions for an organization role.",
Detail: "organization scoped roles may not contain organization member permissions",
})
return false
}
return true
}