Example #1
0
 public static function checkOwnerPermiission()
 {
     if (Session::isOwner()) {
         // You are allowed to perform operation
         return true;
     } else {
         return Session::throwHimOut();
     }
 }
Example #2
0
 public static function checkOwnerPermiission()
 {
     if (Session::checkSuperAdminPermission() && "OWNER" === Session::getLoggedInUser()) {
         // You are allowed to perform operation
         return true;
     } else {
         return Session::throwHimOut();
     }
 }