import { Context } from "./Context" ; export class AuthSource { constructor ( protected ctx ) { } async canViewPost ( id ) { const post = await this . ctx . post . byId ( id ) ; if ( post . status === "published" ) { return true ; } return false ; } async canViewUser ( id ) { return true ; } }