summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorBjörn Geiger2011-03-27 16:47:08 +0200
committerBjörn Geiger2011-03-27 16:47:08 +0200
commit31341ee7700b42105a9052943d70d97e9141dc91 (patch)
tree9fcf83fa71def72eb66e156e139da954336b4db5 /application
parentRollenverwaltung User Module (diff)
downloadpbs2-31341ee7700b42105a9052943d70d97e9141dc91.tar.gz
pbs2-31341ee7700b42105a9052943d70d97e9141dc91.tar.xz
pbs2-31341ee7700b42105a9052943d70d97e9141dc91.zip
ausversehen eingechecktes wieder entfernen
Diffstat (limited to 'application')
-rw-r--r--application/models/Acl.php71
1 files changed, 0 insertions, 71 deletions
diff --git a/application/models/Acl.php b/application/models/Acl.php
deleted file mode 100644
index 3de2ec9..0000000
--- a/application/models/Acl.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-
-class Application_Model_Acl
-{
- private static $roleID;
-
- public static function setRoleID($roleID) {
- Application_Model_Acl::$roleID = $roleID;
- }
-
- public static function getRoleID() {
- return Application_Model_Acl::$roleID;
- }
-
- public static function checkRight($rightID) {
- $rightRolesMapper = new Application_Model_RightRolesMapper();
- $rightroles = $rightRolesMapper->findBy('roleID', Application_Model_Acl::$roleID);
- $rightMapper = new Application_Model_RightMapper();
- foreach($rightroles as $rightrole) {
- $right = $rightMapper->find($rightrole['rightID']);
- if($right->getID() == $rightID) {
- return true;
- }
- }
- return false;
- }
-
- public static function checkRightByMembershipID($membershipID, $rightID) {
- $membershipMapper = new Application_Model_MembershipMapper();
- $membership = $membershipMapper->find($membershipID);
- $rightRolesMapper = new Application_Model_RightRolesMapper();
- $rightroles = $rightRolesMapper->findBy('roleID', $membership->getRoleID());
- $rightMapper = new Application_Model_RightMapper();
- foreach($rightroles as $rightrole) {
- $right = $rightMapper->find($rightrole['rightID']);
- if($right->getID() == $rightID) {
- return true;
- }
- }
- return false;
- }
-
- public static function checkRightTitle($rightTitle) {
- $rightRolesMapper = new Application_Model_RightRolesMapper();
- $rightroles = $rightRolesMapper->findBy('roleID', Application_Model_Acl::$roleID);
- $rightMapper = new Application_Model_RightMapper();
- foreach($rightroles as $rightrole) {
- $right = $rightMapper->find($rightrole['rightID']);
- if($right->getTitle() == $rightTitle) {
- return true;
- }
- }
- return false;
- }
-
- public static function checkRightTitleByMembershipID($membershipID, $rightTitle) {
- $membershipMapper = new Application_Model_MembershipMapper();
- $membership = $membershipMapper->find($membershipID);
- $rightRolesMapper = new Application_Model_RightRolesMapper();
- $rightroles = $rightRolesMapper->findBy('roleID', $membership->getRoleID());
- $rightMapper = new Application_Model_RightMapper();
- foreach($rightroles as $rightrole) {
- $right = $rightMapper->find($rightrole['rightID']);
- if($right->getTitle() == $rightTitle) {
- return true;
- }
- }
- return false;
- }
-}
-