Skip to content
Snippets Groups Projects
Commit e47c27be authored by Martin Haase's avatar Martin Haase
Browse files

removed timeout bug for getObjects and speeded up implementation (now LDAP...

removed timeout bug for getObjects and speeded up implementation (now LDAP handles the logic, which does it much faster than PHP).

git-svn-id: https://textgridlab.org/svn/textgrid/trunk/middleware/tgauth@1327 7c539038-3410-0410-b1ec-0f2a7bf1c452
parent df5d6d70
No related branches found
No related tags found
No related merge requests found
......@@ -479,9 +479,41 @@ class TgExtra {
$result = new resourcesetResponse(); // The return-result
$filter = ""; // RBAC-filter
$arrResource = Array(); // Resoult of the RBAC-search
$arrSessionRole = Array(); // The active roles of the session
$i = 0; // Loop
$arrSessionRole = $this->rbac->sessionRoles( $inRequest->auth, false );
$filter = "(&" . $this->rbac->getConfiguration()->getValue( "resource", "filter" );
$filter .= "(tgprojectid=" . $inRequest->project . ")";
$filter .= "(|";
for( $i = 0; $i < sizeof( $arrSessionRole ); $i++ ) {
$filter .= "(rbacPermission=" . $arrSessionRole[$i] . ":-:read)";
}
$filter .= "))";
$arrResource = $this->connection['resource']->search( $this->rbac->getConfiguration()->getValue( "resource", "base" ),
$filter, "sub",
Array( $this->rbac->getConfiguration()->getValue( "resource", "aliasattribute" ),
$this->rbac->getConfiguration()->getValue( "resource", "namingattribute" ) ) );
for( $i = 0; $i < sizeof( $arrResource ); $i++ ) {
$result->resource[] = $arrResource[$i][$this->rbac->getConfiguration()->getValue( "resource", "aliasattribute" )][0];
}
/*
$filter = "(&" . $this->rbac->getConfiguration()->getValue( "resource", "filter" );
$filter .= "(tgprojectid=" . $inRequest->project . "))";
......@@ -502,7 +534,7 @@ class TgExtra {
}
}
*/
return $result;
......
......@@ -62,7 +62,7 @@ class TgSystem {
// PHP creates an array!
if( isset( $inRequest->roleset ) ) {
is_array( $inRequest->roleset ) ? $arrRole = $inRequest->roleset : array_push( &$arrRole, $inRequest->roleset );
is_array( $inRequest->roleset ) ? $arrRole = $inRequest->roleset : $arrRole[] = $inRequest->roleset;
}
......
<?php
phpinfo();
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment