function _fullcalendar_update_access in FullCalendar 7.2
Same name and namespace in other branches
- 6.2 fullcalendar.module \_fullcalendar_update_access()
- 6 fullcalendar.module \_fullcalendar_update_access()
- 7 fullcalendar.module \_fullcalendar_update_access()
Checks if the user has access to update the given FullCalendar event.
Parameters
object $entity: The entity that will be updated.
Return value
bool TRUE if the user is allowed to update the entity; FALSE if the user is not permitted to update the entity.
2 calls to _fullcalendar_update_access()
- fullcalendar_fullcalendar_editable in ./
fullcalendar.module - Implements hook_fullcalendar_editable().
- hook_fullcalendar_editable in ./
fullcalendar.api.php - Allows your module to affect the editability of the calendar.
1 string reference to '_fullcalendar_update_access'
- fullcalendar_menu in ./
fullcalendar.module - Implements hook_menu().
File
- ./
fullcalendar.module, line 300 - Provides a views style plugin for FullCalendar
Code
function _fullcalendar_update_access($entity) {
global $user;
if (!empty($entity) && (user_access('administer content') || user_access('update any fullcalendar event') || user_access('edit any ' . $entity->bundle . ' content') || user_access('edit own ' . $entity->bundle . ' content') && $entity->uid == $user->uid)) {
return TRUE;
}
return FALSE;
}