@@ -36,4 +36,11 @@ export class Permission {
 | 
			
		||||
   */
 | 
			
		||||
  @Column({ type: 'varchar' })
 | 
			
		||||
  action: PermissionAction;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Turn this into a string for exporting (and jwts).
 | 
			
		||||
   */
 | 
			
		||||
  public toString(): string {
 | 
			
		||||
    return this.target + ":" + this.action;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -129,6 +129,9 @@ export class User extends Principal {
 | 
			
		||||
    return final_permissions
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Turn this into a response.
 | 
			
		||||
   */
 | 
			
		||||
  public toResponse(): ResponsePrincipal {
 | 
			
		||||
    return new ResponseUser(this);
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user