Beispiel #1
0
 /**
  * Check if the current user may create events in this calendar. Here we deviate
  * from the standard if the "freebusypermissions" module is installed. When a 
  * user has access to the freebusy info he may also schedule a meeting in the user's calendar. 
  * 
  * @return boolean
  */
 public function userHasCreatePermission()
 {
     //		if(\GO\Base\Model\Acl::hasPermission($this->getPermissionLevel(),\GO\Base\Model\Acl::CREATE_PERMISSION)){
     //			return true;
     //		}else
     if (\GO::modules()->isInstalled('freebusypermissions')) {
         return \GO\Freebusypermissions\FreebusypermissionsModule::hasFreebusyAccess(\GO::user()->id, $this->user_id);
     } else {
         return true;
     }
 }
Beispiel #2
0
 /**
  * Check if the current user has free busy access.
  * 
  * @return boolean
  */
 public function hasFreeBusyAccess()
 {
     $permission = !empty($this->user_id);
     if ($permission && \GO::modules()->isInstalled("freebusypermissions")) {
         $permission = \GO\Freebusypermissions\FreebusypermissionsModule::hasFreebusyAccess(\GO::user()->id, $this->user_id);
     }
     return $permission;
 }