diff --git a/test/dbconfig.ts b/test/dbconfig.ts index 8e9c748..96743cb 100644 --- a/test/dbconfig.ts +++ b/test/dbconfig.ts @@ -1,3 +1,19 @@ +/* +* Copyright 2023 Philipp Salvisberg +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + import oracledb from "oracledb"; let sysSession: oracledb.Connection; @@ -21,7 +37,6 @@ export const mleConfig: oracledb.ConnectionAttributes = { export async function createSessions(): Promise { sysSession = await oracledb.getConnection(sysConfig); await createUser(mleConfig); - await sysSession.execute("grant execute on javascript to public"); sysSession.close(); mleSession = await oracledb.getConnection(mleConfig); } @@ -35,6 +50,7 @@ async function createUser(config: oracledb.ConnectionAttributes): Promise quota 1m on users `); await sysSession.execute(`grant db_developer_role to ${config.user}`); + await sysSession.execute(`grant execute on javascript to ${config.user}`); } export async function closeSessions(): Promise {