Something went wrong. Try again.
message board on atproto atchan.net
Something went wrong. Try again.
1234567891011import { is_board_authority } from '#lib/domain/board.js'import { can_moderate } from '#lib/server/ozone-client.js'
// Who may read the admin surfaces (/admin and the per-user profile pages): the// board authority, plus anyone the labeler recognises as a moderator. Both are// already the site's two notions of privilege — this just names their union.export async function is_admin(locals: App.Locals): Promise<boolean> { if (is_board_authority(locals.user?.did)) return true return locals.session ? can_moderate(locals.session) : false}