diff --git a/info.textgrid.middleware.tgauth.rbac/rbacSoap/TgExtra.class.php b/info.textgrid.middleware.tgauth.rbac/rbacSoap/TgExtra.class.php index ade29c7e35b24124bb2c52ae6b7b3a1988f31b2d..6e1a0fb53341aaca4acd0e62731de38d42526e30 100755 --- a/info.textgrid.middleware.tgauth.rbac/rbacSoap/TgExtra.class.php +++ b/info.textgrid.middleware.tgauth.rbac/rbacSoap/TgExtra.class.php @@ -580,9 +580,9 @@ class TgExtra { $arrModify['tgusersupplieddata'][] = "FALSE"; // only set the agreesearch flag automatically if it was not there before, i.e. on very first login - if (! isset ($entry['tgagreesearch'] )) { - $arrModify['tgagreesearch'][] = "TRUE"; - } + // if (! isset ($entry['tgagreesearch'] )) { + // $arrModify['tgagreesearch'][] = "TRUE"; + // } // } elseif (isset ($entry['tgusersupplieddata']) && $entry['tgusersupplieddata'][0] === "FALSE") { // // once data came from the IdP, the flag will always remain on FALSE and only the agreesearch Flag can be set // if ( $inRequest->agreeSearch ) { $arrModify['tgagreesearch'][] = "TRUE"; } else { $arrModify['tgagreesearch'][] = "FALSE"; } diff --git a/info.textgrid.middleware.tgauth.rbac/rbacSoap/examples/filterBySid.php b/info.textgrid.middleware.tgauth.rbac/rbacSoap/examples/filterBySid.php index 05e5b2009c2838a04c429c2b16efc927a0a90584..5dca367ef24881f7444021967c2cd858c9d69864 100755 --- a/info.textgrid.middleware.tgauth.rbac/rbacSoap/examples/filterBySid.php +++ b/info.textgrid.middleware.tgauth.rbac/rbacSoap/examples/filterBySid.php @@ -20,90 +20,11 @@ $soapExtra = new SoapClient( "../wsdl/tgextra.wsdl", Array( "trace" => 1 ) ); echo "<BODY><HTML>"; - -/* -// ----------------------------------------------------- -// Before you can create a session you have to -// authenticate. If this was successful you get a -// session-ID that you should keep -// ----------------------------------------------------- -$authReq = new authenticateRequest(); -$authReq->username = "sp00001@textgrid.de"; -$authReq->password = "secret"; - - -echo "<HR/>"; -echo "Doing authentication...<BR/>"; - -try { - - $authResponse = $soapExtra->authenticate( $authReq ); - - if( preg_match( "/[0-9a-z]{2,}/i", $authResponse->sid ) ) { - - echo "DONE: " . $authResponse->sid . "<BR/>"; - - } - -} -catch( SoapFault $f ) { - - echo "SOAP FAULT!: " . $f->faultcode . " / " . $f->faultstring . " / " . $f->detail; - -} - - - -// ----------------------------------------------------- -// Now you can try to add an active role to your session -// ----------------------------------------------------- -$addRoleReq = new addActiveRoleRequest(); -$addRoleReq->username = "sp00001@textgrid.de"; -$addRoleReq->role = "serviceProvider"; -$addRoleReq->sid = $authResponse->sid; - -echo "<HR/>"; -echo "Adding active role...<BR/>"; - -try { - - $addRoleResponse = $soapSystem->addActiveRole( $addRoleReq ); - - if( $addRoleResponse->result ) { - - echo "DONE.<BR/>"; - - } - -} -catch( SoapFault $f ) { - - echo "SOAP FAULT!: " . $f->faultcode . " / " . $f->faultstring . " / " . $f->detail; - -} -*/ - - - -// ----------------------------------------------------- -// If this was successfull you can ask the RBAC-system -// form the operations a role may do on a resource. -// ----------------------------------------------------- $filterReq = new filterBySidRequest(); -//$filterReq->auth = "bLDCUpWHR9aDhqHngQJRod25BLj032tWPWLsuH141zx66LW3wh51MWlYZ0RndZ"; -$filterReq->auth = ""; +$filterReq->auth = "HvO8kwcT81MH42QeHsZdPoqzcWGciHr8HjsSg41VZoDJFB9loUzHMWKVc4DzJSyK1308037097888871"; $filterReq->resource = Array( "textgrid:TGPR3:Die+Leiden+des+jungen+Werther+-+Zweyter+Theil:20080514T134649:xml%2Ftei:1", - "textgrid:TGPR3:TEMPLATE_TITLE+-+aesopus_teilite.xml:20080514T171605:xml%2Ftei:1", - "textgrid:TGPR3:Die+Leiden+des+jungen+Werther+-+Zweyter+Theil:20080514T134646:xml%2Ftei:1", - "textgrid:TGPR3:TEMPLATE_TITLE+-+aesopus_teilite.xml:20080514T155649:xml%2Ftei:1", - "textgrid:TGPR3:TEMPLATE_TITLE+-+werther1_teilite.xml:20080514T155659:xml%2Ftei:1", - "textgrid:TGPR3:Die+Leiden+des+jungen+Werther+-+Zweyter+Theil:20080514T134648:xml%2Ftei:1", - "textgrid:TGPR3:TEMPLATE_TITLE+-+werther1_teilite.xml:20080514T171613:xml%2Ftei:1", - "textgrid:TGPR3:Die+Leiden+des+jungen+Werther+-+Zweyter+Theil:20080514T134530:xml%2Ftei:1", - "textgrid:TGPR3:Die+Leiden+des+jungen+Werther+-+Zweyter+Theil:20080514T154944:xml%2Ftei:1", - "textgrid:TGPR3:Die+Leiden+des+jungen+Werther+-+Zweyter+Theil:20080604T162928:xml%2Ftei:1", // this one should be public - "textgrid:Campe+Band+1%2C+die+zweite:CWDS+-+Band+1%2C+Seite+11%2C+Lemma+abelmosch:20080905T122558:xml%2Ftei:1" //this too, but in 2008-07-..namespace + "textgrid:6d5m.0" // a ProjectFile ); $filterReq->operation = "read";