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

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Mon Jun 23 15:50:43 EDT 2008


Author: jondaley
Date: 2008-06-23 15:50:43 -0400 (Mon, 23 Jun 2008)
New Revision: 6660

Modified:
   plog/branches/lifetype-1.2/class/test/tests/ui/login_test.class.php
Log:
fixed dashboard/new post by granting login privileges to user

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 19:47:37 UTC (rev 6659)
+++ plog/branches/lifetype-1.2/class/test/tests/ui/login_test.class.php	2008-06-23 19:50:43 UTC (rev 6660)
@@ -16,24 +16,37 @@
 			$this->user2 = TestTools::createUser();
 			$this->user3 = TestTools::createUser();
 
+			$userPerms = new UserPermissions();
+
             $perms = new Permissions();
             $loginAccess = $perms->getPermissionByName( "login_perm" );
             if($loginAccess === false){
 				throw( new Exception( "Error getting login permission id" ));
 				die();
             }
+
+                // 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();
+            }
+            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)" ));
+				throw( new Exception( "Error creating UserPermission(login) for user3" ));
 				die();
             }
-
-			$userPerms = new UserPermissions();
             if(!$userPerms->grantPermission( $userPerm )){
-				throw( new Exception( "Error granting login permissions to user" ));
+				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