refactor: update RoleMapping references

This commit is contained in:
Ali BARIN
2024-11-25 15:03:40 +00:00
parent ba82d986c1
commit ee397441ed
16 changed files with 80 additions and 71 deletions

View File

@@ -1,6 +1,6 @@
import { vi, describe, it, expect } from 'vitest';
import SamlAuthProvider from '../models/saml-auth-provider.ee';
import SamlAuthProvidersRoleMapping from '../models/saml-auth-providers-role-mapping.ee';
import RoleMapping from '../models/role-mapping.ee';
import Identity from './identity.ee';
import Base from './base';
import appConfig from '../config/app';
@@ -26,9 +26,9 @@ describe('SamlAuthProvider model', () => {
to: 'saml_auth_providers.id',
},
},
samlAuthProvidersRoleMappings: {
roleMappings: {
relation: Base.HasManyRelation,
modelClass: SamlAuthProvidersRoleMapping,
modelClass: RoleMapping,
join: {
from: 'saml_auth_providers.id',
to: 'role_mappings.saml_auth_provider_id',