Empire technology views
* Added new research-related constants * Added set of views and functions to list empires' technologies. This includes a view which determines the visibility of an in-progress research's details, and a main list view.
This commit is contained in:
parent
e01eab9c09
commit
b15acadc1b
8 changed files with 476 additions and 0 deletions
legacyworlds-server-data/db-structure/tests/user/040-functions/040-empire
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* Test privileges on emp.technology_make_identifier()
|
||||
*/
|
||||
BEGIN;
|
||||
|
||||
SELECT plan( 1 );
|
||||
|
||||
SELECT diag_test_name( 'emp.technology_make_identifier() - No EXECUTE privilege' );
|
||||
SELECT throws_ok( $$
|
||||
SELECT emp.technology_make_identifier( 1 , '' , FALSE );
|
||||
$$ , 42501 );
|
||||
|
||||
SELECT * FROM finish( );
|
||||
ROLLBACK;
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* Test privileges on emp.technology_visibility_view
|
||||
*/
|
||||
BEGIN;
|
||||
\i utils/strings.sql
|
||||
|
||||
SELECT plan( 1 );
|
||||
|
||||
SELECT diag_test_name( 'emp.technology_visibility_view - No SELECT privilege' );
|
||||
SELECT throws_ok( $$
|
||||
SELECT * FROM emp.technology_visibility_view;
|
||||
$$ , 42501 );
|
||||
|
||||
SELECT * FROM finish( );
|
||||
ROLLBACK;
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* Test privileges on emp.technologies_v2_view
|
||||
*/
|
||||
BEGIN;
|
||||
\i utils/strings.sql
|
||||
|
||||
SELECT plan( 1 );
|
||||
|
||||
SELECT diag_test_name( 'emp.technologies_v2_view - SELECT privilege' );
|
||||
SELECT lives_ok( $$
|
||||
SELECT * FROM emp.technologies_v2_view;
|
||||
$$ );
|
||||
|
||||
SELECT * FROM finish( );
|
||||
ROLLBACK;
|
Reference in a new issue