summaryrefslogtreecommitdiffstats
path: root/application/layouts
diff options
context:
space:
mode:
authorBjörn Geiger2011-08-08 11:42:50 +0200
committerBjörn Geiger2011-08-08 11:42:50 +0200
commit2bded7074b9939af40f41c16ebecfdacfe82088a (patch)
tree61f7425ad66782901cda7abd83298e1070d64ef0 /application/layouts
parentcomments (diff)
downloadpoolctrl-2bded7074b9939af40f41c16ebecfdacfe82088a.tar.gz
poolctrl-2bded7074b9939af40f41c16ebecfdacfe82088a.tar.xz
poolctrl-2bded7074b9939af40f41c16ebecfdacfe82088a.zip
Role wieder ins Layout eingefügt
Diffstat (limited to 'application/layouts')
-rw-r--r--application/layouts/default.phtml15
1 files changed, 15 insertions, 0 deletions
diff --git a/application/layouts/default.phtml b/application/layouts/default.phtml
index c81f56c..fb08240 100644
--- a/application/layouts/default.phtml
+++ b/application/layouts/default.phtml
@@ -104,6 +104,21 @@ if(Zend_Auth::getInstance()->hasIdentity()){
echo "<b><i>".$person->getFirstname()." ".$person->getName()."</i></b>";
}
}
+ if(isset($userIDsNamespace['roleID'])){
+ echo " in role ";
+ $roleApiResult = PostToHost($pbs2host, $config['pbs2']['getrole'] . $userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
+ $roleXMLString = $roleApiResult['http-body'];
+ if(strlen($roleXMLString) > 0) {
+ $roleXML = new SimpleXMLElement($roleXMLString);
+ $role = new Application_Model_Role();
+ $role->setID(sprintf("%s", $roleXML->role->id));
+ $role->setGroupID(sprintf("%s", $roleXML->role->groupid));
+ $role->setTitle(sprintf("%s", $roleXML->role->title));
+ $role->setDescription(sprintf("%s", $roleXML->role->description));
+ $role->setInheritance(sprintf("%s", $roleXML->role->inheritance));
+ echo "<b><i>".$role->getTitle()."</i></b>";
+ }
+ }
if(isset($userIDsNamespace['groupID'])){
echo " in group ";
$grouprequest = "groupid=" . $userIDsNamespace['groupID'];