mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 13:37:28 +00:00
* SSO for GitHub Enterprise self hosted * changes * test cases * fixes * label fix * fixes * readme changes
46 lines
976 B
TypeScript
46 lines
976 B
TypeScript
import {
|
|
Entity,
|
|
Column,
|
|
PrimaryGeneratedColumn,
|
|
CreateDateColumn,
|
|
UpdateDateColumn,
|
|
ManyToOne,
|
|
JoinColumn,
|
|
} from 'typeorm';
|
|
import { Organization } from './organization.entity';
|
|
|
|
type Google = {
|
|
clientId: string;
|
|
};
|
|
type Git = {
|
|
clientId: string;
|
|
clientSecret: string;
|
|
hostName?: string;
|
|
};
|
|
@Entity({ name: 'sso_configs' })
|
|
export class SSOConfigs {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id: string;
|
|
|
|
@Column({ name: 'organization_id' })
|
|
organizationId: string;
|
|
|
|
@Column({ name: 'sso' })
|
|
sso: 'google' | 'git' | 'form';
|
|
|
|
@Column({ type: 'json' })
|
|
configs: Google | Git;
|
|
|
|
@Column({ name: 'enabled' })
|
|
enabled: boolean;
|
|
|
|
@CreateDateColumn({ default: () => 'now()', name: 'created_at' })
|
|
createdAt: Date;
|
|
|
|
@UpdateDateColumn({ default: () => 'now()', name: 'updated_at' })
|
|
updatedAt: Date;
|
|
|
|
@ManyToOne(() => Organization, (organization) => organization.id)
|
|
@JoinColumn({ name: 'organization_id' })
|
|
organization: Organization;
|
|
}
|