summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorBjörn Geiger2011-08-05 13:15:30 +0200
committerBjörn Geiger2011-08-05 13:15:30 +0200
commit17e34f51fc56ea52e8bf08d29b3222399fffa6d5 (patch)
treec506011975d09f631f753a4698e99c0197adf2d8 /application
parentcheckright API (diff)
downloadpbs2-17e34f51fc56ea52e8bf08d29b3222399fffa6d5.tar.gz
pbs2-17e34f51fc56ea52e8bf08d29b3222399fffa6d5.tar.xz
pbs2-17e34f51fc56ea52e8bf08d29b3222399fffa6d5.zip
weitere korrektur
Diffstat (limited to 'application')
-rw-r--r--application/controllers/ResourceController.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php
index 2ec373a..306d5aa 100644
--- a/application/controllers/ResourceController.php
+++ b/application/controllers/ResourceController.php
@@ -1042,15 +1042,14 @@ class ResourceController extends Zend_Controller_Action
die();
}
- $rightShortcut = $this->_request->getParam('rightShortcut');
+ $rightShortcut = $this->_request->getParam('rightshortcut');
$rightMapper = new Application_Model_RightMapper();
$result = $rightMapper->findBy(array('shortcut' => $rightShortcut));
- if(!is_array($result[0])) {
+ if(count($result) < 1) {
header('HTTP/1.0 400 Wrong Right Shortcut');
die();
}
- $right = new Application_Model_Right($result[0]);
- $right->setID($result[0]['rightID']);
+ $right = $result[0];
$roleid = $this->membership->getRoleID();
$rightid = $right->getID();
@@ -1061,10 +1060,12 @@ class ResourceController extends Zend_Controller_Action
$xml .= "<xml>\n";
$xml .= "\t<checkright>\n";
+ print_r($rightroles);
+
if(is_object($rightroles)) {
- $xml .= "\t\t</success>true</success>\n";
+ $xml .= "\t\t<success>true</success>\n";
} else {
- $xml .= "\t\t</success>false</success>\n";
+ $xml .= "\t\t<success>false</success>\n";
}
$xml .= "\t</checkright>\n";
@@ -1075,7 +1076,6 @@ class ResourceController extends Zend_Controller_Action
header('Pragma: no-cache');
header('Expires: 0');
echo $xml;
-
}
public function loginAction() {