function _fullcalendar_update_access in FullCalendar 6
Same name and namespace in other branches
- 6.2 fullcalendar.module \_fullcalendar_update_access()
- 7.2 fullcalendar.module \_fullcalendar_update_access()
- 7 fullcalendar.module \_fullcalendar_update_access()
Checks if the user has access to update the given fullcalendar event.
Parameters
$node: The node that will be updated.
Return value
TRUE if the user is allowed to update the node; FALSE if the user is not permitted to update the node.
1 call to _fullcalendar_update_access()
- template_preprocess_views_view_node_fullcalendar in ./
fullcalendar.module - Prepares variables for template file invoked for node row type.
1 string reference to '_fullcalendar_update_access'
- fullcalendar_menu in ./
fullcalendar.module - Implementation of hook_menu().
File
- ./
fullcalendar.module, line 344 - Provides a views style plugin for FullCalendar
Code
function _fullcalendar_update_access($node) {
global $user;
if (!empty($node) && (user_access('administer nodes') || user_access('update any fullcalendar event') || user_access('edit any ' . $node->type . ' content') || user_access('edit own ' . $node->type . ' content') && $node->uid == $user->uid)) {
return TRUE;
}
return FALSE;
}