Reimplement remove and invite user

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-02-16 13:53:05 +04:00
parent 196738f876
commit f931bda10f
9 changed files with 422 additions and 460 deletions

View File

@@ -357,7 +357,7 @@ func (s SessionService) OpenPasswordChildSessionForOrganization(
err = profile.LoadByIdentityIDAndOrganizationID(ctx, tx, scope, rootSession.IdentityID, organizationID)
if err != nil {
if err == coredata.ErrResourceNotFound {
return NewProfileNotFoundError(organizationID)
return NewProfileNotFoundError(gid.Nil)
}
return fmt.Errorf("cannot load profile: %w", err)
}
@@ -459,7 +459,7 @@ func (s SessionService) OpenSAMLChildSessionForOrganization(
err = profile.LoadByIdentityIDAndOrganizationID(ctx, tx, scope, rootSession.IdentityID, organizationID)
if err != nil {
if err == coredata.ErrResourceNotFound {
return NewProfileNotFoundError(organizationID)
return NewProfileNotFoundError(gid.Nil)
}
return fmt.Errorf("cannot load profile: %w", err)
}
@@ -545,7 +545,7 @@ func (s SessionService) AssumeOrganizationSession(
if err := profile.LoadByIdentityIDAndOrganizationID(ctx, tx, scope, rootSession.IdentityID, organizationID); err != nil {
if err == coredata.ErrResourceNotFound {
return NewProfileNotFoundError(organizationID)
return NewProfileNotFoundError(gid.Nil)
}
return fmt.Errorf("cannot load profile: %w", err)
}