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

fixed Bug that does not set agreeSearch flag to FALSE when it was yet unset;...

fixed Bug that does not set agreeSearch flag to FALSE when it was yet unset; fixed warning when user has no roles defined yet

git-svn-id: https://textgridlab.org/svn/textgrid/trunk/middleware/tgauth@12401 7c539038-3410-0410-b1ec-0f2a7bf1c452
parent bce5cc6f
No related branches found
No related tags found
No related merge requests found
...@@ -43,15 +43,14 @@ $attributes = $rbac->getUserAttributes( $Sid ); ...@@ -43,15 +43,14 @@ $attributes = $rbac->getUserAttributes( $Sid );
$newattributes = array("gnuelpfix"); $newattributes = array("gnuelpfix");
$thedisplayname = "anonymous"; $thedisplayname = "anonymous";
//phpinfo();
foreach ($attributes as $a) { foreach ($attributes as $a) {
if ($util->isBoolean($a)) { if ($util->isBoolean($a)) {
if (isset ( $_REQUEST[$a->name] ) && $_REQUEST[$a->name] === "on" && $a->value !== "TRUE") { if (isset ( $_REQUEST[$a->name] ) && $_REQUEST[$a->name] === "on") {
$na = new StdClass(); $na = new StdClass();
$na->name = $a->name; $na->name = $a->name;
$na->value = "TRUE"; $na->value = "TRUE";
$newattributes[] = $na; $newattributes[] = $na;
} else if ($a->value === "TRUE" && !isset ( $_REQUEST[$a->name])) { } else {
$na = new StdClass(); $na = new StdClass();
$na->name = $a->name; $na->name = $a->name;
$na->value = "FALSE"; $na->value = "FALSE";
...@@ -71,10 +70,10 @@ foreach ($attributes as $a) { ...@@ -71,10 +70,10 @@ foreach ($attributes as $a) {
$thedisplayname = $a->value; $thedisplayname = $a->value;
} }
} }
#$file = fopen ("/tmp/xxxPut.log", "w+");
#fwrite ($file, "putting these attrs: ". serialize ($newattributes) ."\n");
#fclose ($file);
$file = fopen ("/tmp/xxxPut.log", "w+");
fwrite ($file, "putting these attrs: ". serialize ($newattributes) ."\n");
fclose ($file);
// write in RBAC // write in RBAC
$res = $rbac->setAttributes($newattributes, $Sid, $loginmode ); $res = $rbac->setAttributes($newattributes, $Sid, $loginmode );
......
...@@ -238,7 +238,9 @@ class RBAC { ...@@ -238,7 +238,9 @@ class RBAC {
"detail" => "SOAP FAULT (authorizedRoles)!: " . $f->faultcode . " / " . $f->faultstring . " / " . $f->detail ); "detail" => "SOAP FAULT (authorizedRoles)!: " . $f->faultcode . " / " . $f->faultstring . " / " . $f->detail );
exit; exit;
} }
if (is_Array($roleResponse->role)) { if (!isset($roleResponse->role)) {
$creReq->roleset = Array();
} elseif (is_Array($roleResponse->role)) {
$creReq->roleset = $roleResponse->role; $creReq->roleset = $roleResponse->role;
} elseif (is_string($roleResponse->role)) { } elseif (is_string($roleResponse->role)) {
$creReq->roleset = Array($roleResponse->role); $creReq->roleset = Array($roleResponse->role);
......
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