chore: naming consistency - Organization ID (#11733)

# Which Problems Are Solved

Renaming of:

  - Resource Owner
  - OrgID
  - OrganizationID
  - Organization Id

# How the Problems Are Solved

Find & Replace, evalue entries, is resource owner referring to an
organization ? If so, do change

# Additional Context

- Closes #11305
This commit is contained in:
Marco A.
2026-03-03 10:24:44 +00:00
committed by GitHub
parent 41b8aa3f18
commit bebee4c795
12 changed files with 35 additions and 37 deletions
@@ -33,7 +33,7 @@ func TestCommandSide_SetCustomMessageText(t *testing.T) {
res res
}{
{
name: "no resource owner, error",
name: "no Organization ID, error",
fields: fields{
eventstore: eventstoreExpect(t),
},
@@ -383,7 +383,7 @@ func TestCommandSide_RemoveCustomMessageText(t *testing.T) {
res res
}{
{
name: "no resource owner, error",
name: "no Organization ID, error",
fields: fields{
eventstore: eventstoreExpect(
t,
+2 -2
View File
@@ -57,8 +57,8 @@ func (c *Commands) AddProjectGrantMember(ctx context.Context, member *AddProject
if err != nil {
return nil, err
}
// TODO: change e2e tests to use correct resourceowner, wrong resource owner is corrected through aggregate
// error if provided resourceowner is not equal to the resourceowner of the project grant
// TODO: change e2e tests to use correct organization ID, wrong organization ID is corrected through aggregate
// error if provided organization ID is not equal to the organization ID of the project grant
//if projectGrantResourceOwner != addedMember.ResourceOwner {
// return nil, zerrors.ThrowPreconditionFailed(nil, "PROJECT-0l10S9OmZV", "Errors.Project.Grant.Invalid")
//}
+3 -3
View File
@@ -408,14 +408,14 @@ func (c *Commands) updateSession(ctx context.Context, checks *SessionCommands, m
}
// checkSessionWritePermission will check that the caller is granted the "session.write" permission on the resource owner of the authenticated user.
// In case the user is not set, and the userResourceOwner is not set (also the case for the session creation),
// In case the user is not set, and the userOrganizationID is not set (also the case for the session creation),
// it will check permission on the instance.
func (c *Commands) checkSessionWritePermission(ctx context.Context, model *SessionWriteModel) error {
userResourceOwner, err := c.sessionUserResourceOwner(ctx, model)
userOrganizationID, err := c.sessionUserResourceOwner(ctx, model)
if err != nil {
return err
}
return c.checkPermission(ctx, domain.PermissionSessionWrite, userResourceOwner, model.UserID)
return c.checkPermission(ctx, domain.PermissionSessionWrite, userOrganizationID, model.UserID)
}
// checkSessionTerminationPermission will check that the provided sessionToken is correct or
+4 -4
View File
@@ -663,7 +663,7 @@ func TestCommandSide_AddUserGrant(t *testing.T) {
},
},
{
name: "usergrant without resource owner on project, ok",
name: "usergrant without Organization ID on project, ok",
fields: fields{
eventstore: expectEventstore(
expectFilter(
@@ -816,7 +816,7 @@ func TestCommandSide_AddUserGrant(t *testing.T) {
},
},
{
name: "usergrant for granted resource owner, ok",
name: "usergrant for granted Organization ID, ok",
fields: fields{
eventstore: expectEventstore(
expectFilter(
@@ -1717,7 +1717,7 @@ func TestCommandSide_ChangeUserGrant(t *testing.T) {
},
},
{
name: "usergrant for projectgrant same resource owner, ok",
name: "usergrant for projectgrant same Organization ID, ok",
fields: fields{
eventstore: expectEventstore(
expectFilter(
@@ -1813,7 +1813,7 @@ func TestCommandSide_ChangeUserGrant(t *testing.T) {
},
},
{
name: "usergrant for project without resource owner, ok",
name: "usergrant for project without Organization ID, ok",
fields: fields{
eventstore: expectEventstore(
expectFilter(