From ad6f79028acb286ddcc1d267ed00918f723f867d Mon Sep 17 00:00:00 2001 From: seek3r Date: Mon, 13 Jan 2003 11:29:41 +0000 Subject: [PATCH] added more details to acl2_tester.php --- admin/acl2_tester.php | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/admin/acl2_tester.php b/admin/acl2_tester.php index fcfad24bba..c49f5f4091 100644 --- a/admin/acl2_tester.php +++ b/admin/acl2_tester.php @@ -23,10 +23,10 @@ echo 'This test is going to delete all your phpgw_acl2 records to ensure that the tests run as expected.
'; $GLOBALS['phpgw']->db->query('DELETE FROM phpgw_acl2',__LINE__,__FILE__); - echo 'All records deleted...
'; + echo 'Action: DELETE FROM phpgw_acl2

'; echo 'Running checks on .one.two.three after changing directly granted rights as well as ones it will inherit from
'; - echo '1: check rights for .one.two which will get inherited by .one.two.three
'; + echo '
1: check rights for .one.two which will get inherited by .one.two.three
'; ttt('.one.two', 1); ttt('.one.two', 2); ttt('.one.two', 4); @@ -40,54 +40,61 @@ ttt('.one.two.three', 8); echo 'You can see that no rights are set directly as well
'; - $sec->add('.one.two.three',4,0); echo '
3: add rights 4 to .one.two.three
'; + echo 'Action: $acl2->add(\'.one.two.three\',4,0);
'; + $sec->add('.one.two.three',4,0); ttt('.one.two.three', 1); ttt('.one.two.three', 2); ttt('.one.two.three', 4); ttt('.one.two.three', 8); - $sec->add('.one.two.three',8,0); echo '
4: add rights 8 to .one.two.three
'; + echo 'Action: $acl2->add(\'.one.two.three\',8,0);
'; + $sec->add('.one.two.three',8,0); ttt('.one.two.three', 1); ttt('.one.two.three', 2); ttt('.one.two.three', 4); ttt('.one.two.three', 8); - $sec->remove('.one.two.three',4,0); echo '
5: remove rights 4 from .one.two.three
'; + echo 'Action: $acl2->remove(\'.one.two.three\',4,0);
'; + $sec->remove('.one.two.three',4,0); ttt('.one.two.three', 1); ttt('.one.two.three', 2); ttt('.one.two.three', 4); ttt('.one.two.three', 8); - $sec->set('.one.two.three', 2,0); echo '
5: set rights to 2 on .one.two.three
'; + echo 'Action: $acl2->set(\'.one.two.three\', 2,0);
'; + $sec->set('.one.two.three', 2,0); ttt('.one.two.three', 1); ttt('.one.two.three', 2); ttt('.one.two.three', 4); ttt('.one.two.three', 8); - $sec->add('.one.two',8,0); echo '
Now to see inheritance in action...
'; echo '6: add rights 8 to .one.two
'; + echo 'Action: $acl2->add(\'.one.two\',8,0);
'; + $sec->add('.one.two',8,0); ttt('.one.two.three', 1); ttt('.one.two.three', 2); ttt('.one.two.three', 4); ttt('.one.two.three', 8); echo 'You can see here that it has inherited rights 8 from .one.two
'; - $sec->add('.one.two',4,0); echo '
7: add rights 4 to .one.two
'; + echo 'Action: $acl2->add(\'.one.two\',4,0);
'; + $sec->add('.one.two',4,0); ttt('.one.two.three', 1); ttt('.one.two.three', 2); ttt('.one.two.three', 4); ttt('.one.two.three', 8); echo 'You can see here that it has also inherited rights 4 from .one.two
'; - $sec->add('.one.two',8,1); echo '
Now to see inherited rights masks in action...
'; echo '8: add rights mask for 8 to .one.two
'; + echo 'Action: $acl2->add(\'.one.two\',8,1);
'; + $sec->add('.one.two',8,1); ttt('.one.two.three', 1); ttt('.one.two.three', 2); ttt('.one.two.three', 4);