[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6669] trunk
- Subject: SF.net SVN: ledger-smb:[6669] trunk
- From: ..hidden..
- Date: Mon, 27 Jan 2014 14:23:08 +0000
Revision: 6669
http://sourceforge.net/p/ledger-smb/code/6669
Author: einhverfr
Date: 2014-01-27 14:23:07 +0000 (Mon, 27 Jan 2014)
Log Message:
-----------
Adding still somewhat incomplete permissions tests for read permissions
Modified Paths:
--------------
trunk/sql/modules/test/Roles.sql
trunk/t/43-dbtest.t
Modified: trunk/sql/modules/test/Roles.sql
===================================================================
--- trunk/sql/modules/test/Roles.sql 2014-01-27 13:07:46 UTC (rev 6668)
+++ trunk/sql/modules/test/Roles.sql 2014-01-27 14:23:07 UTC (rev 6669)
@@ -63,6 +63,65 @@
'person_to_company', 'eca_to_contact', 'eca_to_location', 'eca_note'
]) t;
+INSERT INTO test_result(test_name, success)
+SELECT 'ar_transaction_list can read ' || t,
+ test__has_select_permission('ar_transaction_list', t)
+ FROM unnest(ARRAY['partsvendor'::text, 'partscustomer', 'taxcategory',
+ 'entity', 'company', 'location', 'entity_to_location',
+ 'entity_to_contact', 'person', 'entity_credit_account',
+ 'contact_class', 'eca_tax', 'entity_class', 'entity_note',
+ 'entity_bank_account', 'entity_other_name', 'location_class',
+ 'person_to_company', 'eca_to_contact', 'eca_to_location', 'eca_note',
+ 'ar', 'acc_trans', 'invoice', 'ac_tax_form', 'invoice_tax_form'
+ ]) t;
+
+INSERT INTO test_result(test_name, success)
+SELECT 'ap_transaction_list can read ' || t,
+ test__has_select_permission('ap_transaction_list', t)
+ FROM unnest(ARRAY['partsvendor'::text, 'partscustomer', 'taxcategory',
+ 'entity', 'company', 'location', 'entity_to_location',
+ 'entity_to_contact', 'person', 'entity_credit_account',
+ 'contact_class', 'eca_tax', 'entity_class', 'entity_note',
+ 'entity_bank_account', 'entity_other_name', 'location_class',
+ 'person_to_company', 'eca_to_contact', 'eca_to_location', 'eca_note',
+ 'ap', 'acc_trans', 'invoice', 'ac_tax_form', 'invoice_tax_form'
+ ]) t;
+
+INSERT INTO test_result(test_name, success)
+SELECT 'sales_order_list can read ' || t,
+ test__has_select_permission('sales_order_list', t)
+ FROM unnest(ARRAY['partsvendor'::text, 'partscustomer', 'taxcategory',
+ 'entity', 'company', 'location', 'entity_to_location',
+ 'entity_to_contact', 'person', 'entity_credit_account',
+ 'contact_class', 'eca_tax', 'entity_class', 'entity_note',
+ 'entity_bank_account', 'entity_other_name', 'location_class',
+ 'person_to_company', 'eca_to_contact', 'eca_to_location', 'eca_note',
+ 'oe', 'orderitems'
+ ]) t;
+
+INSERT INTO test_result(test_name, success)
+SELECT 'purchase_order_list can read ' || t,
+ test__has_select_permission('purchase_order_list', t)
+ FROM unnest(ARRAY['partsvendor'::text, 'partscustomer', 'taxcategory',
+ 'entity', 'company', 'location', 'entity_to_location',
+ 'entity_to_contact', 'person', 'entity_credit_account',
+ 'contact_class', 'eca_tax', 'entity_class', 'entity_note',
+ 'entity_bank_account', 'entity_other_name', 'location_class',
+ 'person_to_company', 'eca_to_contact', 'eca_to_location', 'eca_note',
+ 'oe', 'orderitems'
+ ]) t;
+
+INSERT INTO test_result(test_name, success)
+SELECT 'inventory_reports can read ' || t,
+ test__has_select_permission('inventory_reports', t)
+FROM unnest(array['ar'::text, 'ap', 'inventory', 'invoice', 'acc_trans']) t;
+
+INSERT INTO test_result(test_name, success)
+SELECT 'gl_reports can read ' || t,
+ test__has_select_permission('gl_reports', t)
+FROM unnest(array['gl'::text, 'acc_trans', 'account_checkpoint', 'ar', 'ap',
+ 'entity', 'entity_credit_account'])t;
+
-- TEST RESULTS
SELECT test_name, success FROM test_result;
Modified: trunk/t/43-dbtest.t
===================================================================
--- trunk/t/43-dbtest.t 2014-01-27 13:07:46 UTC (rev 6668)
+++ trunk/t/43-dbtest.t 2014-01-27 14:23:07 UTC (rev 6669)
@@ -5,7 +5,7 @@
plan skip_all => 'Skipping all. Told not to test db.';
}
else {
- plan tests => 310;
+ plan tests => 449;
if (defined $ENV{LSMB_NEW_DB}){
$ENV{PGDATABASE} = $ENV{LSMB_NEW_DB};
}
@@ -15,7 +15,7 @@
}
my @testscripts = qw(Account Reconciliation Business_type Company Draft Payment
- Session Voucher System Taxform COGS-FIFO PNL);
+ Session Voucher System Taxform COGS-FIFO PNL Roles);
chdir 'sql/modules/test/';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits