mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-21 12:28:46 +00:00
fix(console): fix self-management without explicit roles (#11583)
# Which Problems Are Solved The self-management of user without any permissions in Console was no longer possible and the UI was completely stuck. This was due to the method `getActiveOrg`, which returned an error in case no organization could be retrieved. # How the Problems Are Solved - Return `undefined` in case no organization is found and handle cases where an organization is required. - Redirect the user to `/users/me` if no organization is retrieved on the start - Prevent users without roles to access the home page # Additional Changes None # Additional Context closes #11567
This commit is contained in:
@@ -184,6 +184,10 @@ export class UserCreateV2Component implements OnInit {
|
||||
this.loading.set(true);
|
||||
|
||||
const activeOrg = await this.authService.getActiveOrg();
|
||||
if (!activeOrg) {
|
||||
console.log('No active organization found. Cannot create user.');
|
||||
return;
|
||||
}
|
||||
const userValues = this.userForm.getRawValue();
|
||||
|
||||
const humanReq: MessageInitShape<typeof AddHumanUserRequestSchema> = {
|
||||
|
||||
Reference in New Issue
Block a user