add api user role and fix api auth failure response

This commit is contained in:
Oliver Gorwits
2018-12-31 19:30:41 +00:00
parent 1a038079bf
commit 4691808fa6
2 changed files with 13 additions and 1 deletions

View File

@@ -19,6 +19,9 @@ __PACKAGE__->result_source_instance->view_definition(<<ENDSQL
UNION
SELECT username, 'ldap' AS role FROM users
WHERE ldap
UNION
SELECT username, 'api', AS role FROM users
WHERE token AND token_from
ENDSQL
);