Skip to content
Snippets Groups Projects
Commit ab3ac683 authored by Eric Cano's avatar Eric Cano
Browse files

Added support for granting necessary permission for CNS in VMGR schema.

Updated the SQL test accordingly.
Renamed castor-SQLSchemaTests.in to castor-SQLSchemaTests.in.pl for file edition (IDE) convenience.
parent 170850b7
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,6 @@ add_custom_target(stager_oracle_create.sql ALL
CastorInstallSQL(stager_oracle_create.sql)
CastorInstallSQLFromSource(drop_oracle_schema.sql)
CastorInstallConfigNoRename(SQLSchemaTests.conf)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/castor-SQLSchemaTests.in
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/castor-SQLSchemaTests.in.pl
${CMAKE_CURRENT_BINARY_DIR}/castor-SQLSchemaTests)
CastorInstallScript(${CMAKE_CURRENT_BINARY_DIR}/castor-SQLSchemaTests)
......@@ -55,6 +55,7 @@ sub filterSQL ( $$$$$ ) {
$line=~ s/\&cnsPasswd/$NsDbPasswd/g;
$line=~ s/\&cnsDbName/$NsDbName/g;
$line=~ s/\&vmgrSchema\./$vmgrSchema/g;
$line=~ s/\&cnsSchema/$NsDbUser/g;
return $line;
}
......
......@@ -103,3 +103,10 @@ ALTER TABLE vmgr_tape_pool
ALTER TABLE vmgr_tape_tag
ADD CONSTRAINT fk_t_vid FOREIGN KEY (vid) REFERENCES vmgr_tape_info(vid)
ADD CONSTRAINT pk_tag PRIMARY KEY (vid);
-- Permissions should be granted to the CNS schema for VMGR_TAPE_SIDE and
-- VMGR_TAPE_STATUS_VIEW.
UNDEF cnsSchema
ACCEPT cnsSchema CHAR DEFAULT 'castor_ns' PROMPT 'Enter the name of the NS schema (default castor_ns): ';
GRANT SELECT ON vmgr_tape_side TO &cnsSchema;
GRANT SELECT ON vmgr_tape_status_view TO &cnsSchema;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment