public function CheckPermission($Permission, $FullMatch = TRUE, $JunctionTable = '', $JunctionID = '') {
      if (is_object($this->User)) {
         if ($this->User->Banned || GetValue('Deleted', $this->User))
            return FALSE;
         elseif ($this->User->Admin)
            return TRUE;
      }

      // Allow wildcard permission checks (e.g. 'any' Category)
      if ($JunctionID == 'any')
         $JunctionID = '';

      $Permissions = $this->GetPermissions();
      if ($JunctionTable && !C('Garden.Permissions.Disabled.'.$JunctionTable)) {
         // Junction permission ($Permissions[PermissionName] = array(JunctionIDs))
         if (is_array($Permission)) {
            foreach ($Permission as $PermissionName) {
               if($this->CheckPermission($PermissionName, FALSE, $JunctionTable, $JunctionID)) {
						if(!$FullMatch)
							return TRUE;
					} else {
						if($FullMatch)
							return FALSE;
					}
            }
            return TRUE;
         } else {
            if ($JunctionID !== '') {
               $Result = array_key_exists($Permission, $Permissions)
                  && is_array($Permissions[$Permission])
                  && in_array($JunctionID, $Permissions[$Permission]);
            } else {
               $Result = array_key_exists($Permission, $Permissions)
                  && is_array($Permissions[$Permission])
                  && count($Permissions[$Permission]);
            }
            return $Result;
         }
      } else {
         // Non-junction permission ($Permissions = array(PermissionNames))
         if (is_array($Permission)) {
            return ArrayInArray($Permission, $Permissions, $FullMatch);
         } else {
            return in_array($Permission, $Permissions) || array_key_exists($Permission, $Permissions);
         }
      }
   }