mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 16:07:11 +08:00
21 lines
510 B
TypeScript
21 lines
510 B
TypeScript
import type { ArtifactReadSubject } from '../domain/artifactRead';
|
|
|
|
export type ArtifactReadAuthorizationEffect =
|
|
| 'allow'
|
|
| 'deny'
|
|
| 'require_approval';
|
|
|
|
export interface ArtifactReadAuthorizationRequest {
|
|
action: 'artifact.read';
|
|
subject: Readonly<ArtifactReadSubject>;
|
|
projectId: string;
|
|
runId: string;
|
|
logArtifactId: string;
|
|
}
|
|
|
|
export interface ArtifactReadAuthorizer {
|
|
authorize(
|
|
request: Readonly<ArtifactReadAuthorizationRequest>,
|
|
): Promise<ArtifactReadAuthorizationEffect>;
|
|
}
|