Correct the menu callbacks declaration

kiamlaluno - December 31, 2008 - 13:36
Project:Kaltura
Version:6.x-1.3
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

When there is the need to create a menu callback accessible to anybody, it's enough to use 'access arguments' => array(TRUE). There is no need to use a function that just returns TRUE.
Normally, the permission used in such cases is access content; therefore the code becomes 'access arguments' => array('access content').

#1

kiamlaluno - December 31, 2008 - 14:07

The shorter way to define a menu callback that doesn't have a limited access is to use

<?php
'access callback' => TRUE
?>

This is reported in the Drupal documentation, on the line where it says

We support 'access callback' => TRUE (and FALSE of course).

#2

gonen.kaltura - January 14, 2009 - 13:59
Status:active» fixed

fixed in 6.x-1.4 and 5.x-1.3

#3

System Message - January 28, 2009 - 14:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.