mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-06 17:02:25 +00:00
fix: create project with the right permission (#10485)
# Which Problems Are Solved
When a user with an `ORG_PROJECT_CREATOR` role tries to create a
project, the request fails with `No matching permissions found
(AUTH-AWfge)` error. This is because `project.write` was set as the
required permission instead of `project.create` during project creation.
# How the Problems Are Solved
By setting the right required permission (`project.create`) while
creating new projects.
# Additional Changes
N/A
# Additional Context
- Closes #10399
(cherry picked from commit 0929c4d235)
This commit is contained in:
committed by
Livio Spring
parent
3156c5bc02
commit
62403d27e4
@@ -295,8 +295,11 @@ func (i *Instance) CreateUserTypeHuman(ctx context.Context, email string) *user_
|
||||
}
|
||||
|
||||
func (i *Instance) CreateUserTypeMachine(ctx context.Context, orgId string) *user_v2.CreateUserResponse {
|
||||
if orgId == "" {
|
||||
orgId = i.DefaultOrg.GetId()
|
||||
}
|
||||
resp, err := i.Client.UserV2.CreateUser(ctx, &user_v2.CreateUserRequest{
|
||||
OrganizationId: i.DefaultOrg.GetId(),
|
||||
OrganizationId: orgId,
|
||||
UserType: &user_v2.CreateUserRequest_Machine_{
|
||||
Machine: &user_v2.CreateUserRequest_Machine{
|
||||
Name: "machine",
|
||||
|
||||
Reference in New Issue
Block a user