Commit 7a34191a authored by m.stenta's avatar m.stenta
Browse files

Only display log types that the user has access to in /log/add.

parent bd7b2b2b
......@@ -19,7 +19,9 @@ function log_view($log) {
function log_add_types_page() {
$items = array();
foreach (log_types() as $log_type_key => $log_type) {
$items[] = l(entity_label('log_type', $log_type), 'log/add/' . $log_type_key);
if (log_access('create', $log_type)) {
$items[] = l(entity_label('log_type', $log_type), 'log/add/' . $log_type_key);
}
}
return array(
'list' => array(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment