Results 1 to 3 of 3

Thread: zend_acl problem

  1. #1
    Join Date
    Mar 2012
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default zend_acl problem

    Hi,

    we developed a application using php with zend framework..

    i have a acl file and has some code..
    Code:
    $Details = $oRole->getDetailsByName("KLIENT_UTSKRIVNING");
    if($Details->Return2==1)
    $this->allow(self::TYPE_STAFF, 'student-index-discharge');
                
    $Details = $oRole->getDetailsByName("KLIENT_SKOLA");
    if($Details->Return2==1)
    $this->allow(self::TYPE_STAFF, 'student-index-school');
    i have same lot of code like this..here i am sending function name and getting from database and i am giving permitions to the users.


    and another file called role.php i have a code.
    Code:
    public function getDetailsByName($a_sName) {
    		$oSystemFunction = new Function_Model_DbTable_Systemfunction();
    		$FunctionGuid = $oSystemFunction->getFunctionGuidByName($a_sName);
    
            if($iReturn = $this->Organization($FunctionGuid->Guid)){
    			$oRoleFunction = new Role_Model_DbTable_RoleFunction();
    			$iReturn = "0";
                $iReturn1 = "0";
                $iReturn2 = "0";
                $iReturn3 = "0";
    			foreach ($this->checkRolesByUser() as $oRole) {
    				$aRightRoles = $oRoleFunction->getRoleRights($oRole->RoleGuid, $FunctionGuid->Guid);
    				foreach ($aRightRoles as $oRightRole) {
    					if ($oRightRole->ReadRight == 1)
    						$iReturn = $oRightRole->ReadRight;
                        if ($oRightRole->CreateRight == 1)
                            $iReturn1 = $oRightRole->CreateRight;
                        if ($oRightRole->UpdateRight == 1)
                            $iReturn2 = $oRightRole->UpdateRight;
                        if ($oRightRole->DeleteRight == 1)
                            $iReturn3 = $oRightRole->DeleteRight;
    				}
    			}
    		}
            $Details = array();
    		$Details = (object) $Details;
            $Details->FunctionGuid = $FunctionGuid->Guid;
    		$Details->Return = $iReturn;
    		$Details->Return1 = $iReturn1;
    		$Details->Return2 = $iReturn2;
    		$Details->Return3 = $iReturn3;
    		return $Details;
           
    	}
    my prob is if i click on any module every time query runs and getting the data from data base..so that my application is getting slow..

    so what is the alternate way and how to do it?

    Help me out thanks in advance..

    Regards
    kiran
    Last edited by Beverleyh; 01-21-2015 at 12:43 PM. Reason: Formatting

  2. #2
    Join Date
    Mar 2011
    Posts
    2,171
    Thanks
    61
    Thanked 121 Times in 117 Posts
    Blog Entries
    4

    Default

    Cache the data from the database. Did you pack the zend framework into an exe with your php code?

  3. #3
    Join Date
    Mar 2012
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi,

    THanks for ur quick responce..can u tell me how to do it?


    yes my total application was developed in zend framewwork only...

Similar Threads

  1. Replies: 2
    Last Post: 01-13-2006, 05:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •