[pLog-svn] r6663 - plog/branches/lifetype-1.2/class/test/tests/ui

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Mon Jun 23 16:25:07 EDT 2008


Author: jondaley
Date: 2008-06-23 16:25:07 -0400 (Mon, 23 Jun 2008)
New Revision: 6663

Modified:
   plog/branches/lifetype-1.2/class/test/tests/ui/login_test.class.php
Log:
testtools::create creates the privileges for me, so now I need to revoke the login privilege from the one user I want to test

Modified: plog/branches/lifetype-1.2/class/test/tests/ui/login_test.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/test/tests/ui/login_test.class.php	2008-06-23 20:24:33 UTC (rev 6662)
+++ plog/branches/lifetype-1.2/class/test/tests/ui/login_test.class.php	2008-06-23 20:25:07 UTC (rev 6663)
@@ -21,32 +21,15 @@
             $perms = new Permissions();
             $loginAccess = $perms->getPermissionByName( "login_perm" );
             if($loginAccess === false){
-				throw( new Exception( "Error getting login permission id" ));
-				die();
+				print "Error getting login permission id";
+                return;
             }
 
-                // Give user2 login privileges
-            $userPerm = new UserPermission( $this->user2->getId(), 0, $loginAccess->getId() );
-            if(!$userPerm){
-				throw( new Exception( "Error creating UserPermission(login) for user2" ));
-				die();
+                // Revoke user login privileges
+            if(!$userPerms->revokePermission( $this->user->getId(), 0, $loginAccess->getId())){
+				print "Error revoking login permissions from user";
             }
-            if(!$userPerms->grantPermission( $userPerm )){
-				throw( new Exception( "Error granting login permissions to user2" ));
-				die();
-            }
 
-                // Give user3 login privileges
-            $userPerm = new UserPermission( $this->user3->getId(), 0, $loginAccess->getId() );
-            if(!$userPerm){
-				throw( new Exception( "Error creating UserPermission(login) for user3" ));
-				die();
-            }
-            if(!$userPerms->grantPermission( $userPerm )){
-				throw( new Exception( "Error granting login permissions to user3" ));
-				die();
-            }
-
             $this->blog = TestTools::createBlog( $this->user2->getId());
 		}
 		



More information about the pLog-svn mailing list