public function validate(PermissionAccess $pae)
 {
     if ($pae instanceof ConversationAccess) {
         $message = $pae->getPermissionObject();
     }
     if ($message instanceof Message) {
         $u = new User();
         return $u->getUserID() == $message->getConversationMessageUserID();
     }
     return false;
 }
 public function getAccessEntityUsers(PermissionAccess $pae)
 {
     $c = null;
     if ($pae instanceof PagePermissionAccess) {
         $c = $pae->getPermissionObject();
     } else {
         if ($pae instanceof AreaPermissionAccess) {
             $c = $pae->getPermissionObject()->getAreaCollectionObject();
         } else {
             if ($pae instanceof BlockPermissionAccess) {
                 $a = $pae->getPermissionObject()->getBlockAreaObject();
                 $c = $a->getAreaCollectionObject();
             }
         }
     }
     if (is_object($c) && $c instanceof Page) {
         $ui = UserInfo::getByID($c->getCollectionUserID());
         $users = array($ui);
         return $users;
     }
 }
 public function validate(PermissionAccess $pae)
 {
     if ($pae instanceof FileSetPermissionAccess) {
         return true;
     }
     if ($pae instanceof FilePermissionAccess) {
         $f = $pae->getPermissionObject();
         if (is_object($f)) {
             $u = new User();
             return $u->getUserID() == $f->getUserID();
         }
     }
     return false;
 }
示例#4
0
 public function getPermissionObject()
 {
     return parent::getPermissionObject();
 }