diff --git a/core/auth/auth.go b/core/auth/auth.go index 24d490e3e..0270ea1a6 100644 --- a/core/auth/auth.go +++ b/core/auth/auth.go @@ -1943,7 +1943,7 @@ func (a *Auth) deleteAccountFromApps(context storage.TransactionContext, account } } - err := a.storage.DeleteOrgAppsMembershipsObject(context, account.ID, membershipsIDs) + err := a.storage.DeleteOrgAppsMemberships(context, account.ID, membershipsIDs) if err != nil { return errors.WrapErrorAction(logutils.ActionDelete, model.TypeAccount, nil, err) } diff --git a/core/auth/interfaces.go b/core/auth/interfaces.go index 9066c361a..02370fac8 100644 --- a/core/auth/interfaces.go +++ b/core/auth/interfaces.go @@ -487,7 +487,7 @@ type Storage interface { SaveAccount(context storage.TransactionContext, account *model.Account) error DeleteAccount(context storage.TransactionContext, id string) error UpdateAccountUsageInfo(context storage.TransactionContext, accountID string, updateLoginTime bool, updateAccessTokenTime bool, clientVersion *string) error - DeleteOrgAppsMembershipsObject(context storage.TransactionContext, accountID string, membershipsIDs []string) error + DeleteOrgAppsMemberships(context storage.TransactionContext, accountID string, membershipsIDs []string) error //Profiles UpdateAccountProfile(context storage.TransactionContext, profile model.Profile) error diff --git a/driven/storage/adapter.go b/driven/storage/adapter.go index 51cc14c9b..7d20319f4 100644 --- a/driven/storage/adapter.go +++ b/driven/storage/adapter.go @@ -2322,8 +2322,8 @@ func (sa *Adapter) DeleteAccountRoles(context TransactionContext, accountID stri return nil } -// DeleteOrgAppsMembershipsObject delete the whole account org_apps_memberships object -func (sa *Adapter) DeleteOrgAppsMembershipsObject(context TransactionContext, accountID string, membershipsIDs []string) error { +// DeleteOrgAppsMemberships deletes org apps memberships from the account +func (sa *Adapter) DeleteOrgAppsMemberships(context TransactionContext, accountID string, membershipsIDs []string) error { //filter filter := bson.D{ primitive.E{Key: "_id", Value: accountID},