feat: attribute files and downloads to actors (#559)

* feat: attribute files and downloads to actors

* chore: refresh preview after staging migration

* fix: use a dash for missing actor identity

* fix: complete actor attribution and file creator UI

* fix: refine file creator identity UI
This commit is contained in:
Jasper Van
2026-08-08 11:04:16 -04:00
committed by GitHub
parent 1b7d8d55f5
commit fa19323eda
68 changed files with 7978 additions and 196 deletions
+10 -1
View File
@@ -5,7 +5,7 @@ import type { DavLock } from '../domain/webdav'
import type { WebDavMountPath } from '../domain/webdav-public-url'
import type { Platform } from '../platform/interface'
import type { Deps } from '../usecases/deps'
import type { WebDavTarget } from '../usecases/ports'
import type { ActorIdentity, WebDavTarget } from '../usecases/ports'
import type { TransferAuditTarget } from '../usecases/transfer-activity'
export type Env = {
@@ -157,6 +157,15 @@ export function boundWorkspaceOrgId(context: AuthzContext): string | null {
return context.workspace.mode === 'bound' ? context.workspace.orgId : null
}
export function authzActorIdentity(context: AuthzContext): ActorIdentity | null {
if (!context.actor) return null
return {
type: context.actor.type,
ref: context.actor.ref,
issuer: 'issuer' in context.actor ? context.actor.issuer : null,
}
}
export const anonymousAuthzContext = (): AuthzContext => ({
credential: 'anonymous',
userId: null,