odc
odc copied to clipboard
fix(database-permission): could not call inside dbms package in SQL console
What type of PR is this?
type-bug module-database permission
What this PR does / why we need it:
When execute:
call DBMS_OUTPUT.putline('aaaa');
We cannot judge DBMS_OUTPUT is name of a database or a package. Now we will recognize them as database name, but the "database" is not exist, so the SQL will be intercepted during permission check.
This PR fix it by add a whitelist, the default vaule is all OB inside system packages. User can add items by config metaDB. If a new dialect type is supported, we no need to change codes, but add config key as odc.permission-check.whitelist.database.[dialect-type].
Which issue(s) this PR fixes:
Fixes #2391
Special notes for your reviewer:
Self-test passed.
Additional documentation e.g., usage docs, etc.: