message: including 'user_privilege' to privilege query
diff: import { Context } from '@curveball/core';
  -import { NotFound } from '@curveball/http-errors/dist';
  import db from '../database';
  import database from '../database';
  import { User } from '../user/types';
  @@ -54,7 +53,7 @@ export async function hasPrivilege(who: User | Context, privilege: string, resou
  export async function findPrivileges(): Promise<Privilege[]> {
  - const query = 'SELECT privilege, description FROM privileges;';
  + const query = 'SELECT privilege, description FROM privileges UNION ALL SELECT DISTINCT scope, null FROM user_privileges LEFT JOIN privileges ON scope = privilege WHERE privilege IS NULL';
  const result = await database.query(query);
  return result[0];
  @@ -66,7 +65,10 @@ export async function findPrivilege(privilege: string): Promise<Privilege> {
  const result = await database.query(query, [privilege]);
  if (result[0].length !== 1) {
  - throw new NotFound('Privilege name ' + privilege + ' not found');
  + return {
  + privilege: privilege,
  + description: ''
  + }
  }
  return result[0][0];
  