Closed (duplicate)
Project:
Domain
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2008 at 21:41 UTC
Updated:
18 Apr 2008 at 14:48 UTC
After a fresh install of drupal 6.2 and domain 6.x-1.0-beta there are some domain menu entries missing (Settings, Domain list, Create domain record, Node settings and Batch updating).
The access arguments for these menu entries in domain_menu() are missing.
Here is my patch, please review:
--- domain.module 2008-03-30 19:51:46.000000000 +0200
+++ domain.module 2008-04-15 22:52:34.000000000 +0200
@@ -80,6 +80,7 @@
);
$items['admin/build/domain/settings'] = array(
'title' => 'Settings',
+ 'access arguments' => array('administer domains'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'page callback' => 'domain_configure',
'file' => 'domain.admin.inc',
@@ -87,6 +88,7 @@
);
$items['admin/build/domain/view'] = array(
'title' => 'Domain list',
+ 'access arguments' => array('administer domains'),
'type' => MENU_LOCAL_TASK,
'page callback' => 'domain_view',
'file' => 'domain.admin.inc',
@@ -94,6 +96,7 @@
);
$items['admin/build/domain/create'] = array(
'title' => 'Create domain record',
+ 'access arguments' => array('administer domains'),
'type' => MENU_LOCAL_TASK,
'page callback' => 'domain_create',
'file' => 'domain.admin.inc',
@@ -101,6 +104,7 @@
);
$items['admin/build/domain/advanced'] = array(
'title' => 'Node settings',
+ 'access arguments' => array('administer domains'),
'type' => MENU_LOCAL_TASK,
'page callback' => 'domain_advanced',
'file' => 'domain.admin.inc',
@@ -111,6 +115,7 @@
if (!empty($batch)) {
$items['admin/build/domain/batch'] = array(
'title' => 'Batch updating',
+ 'access arguments' => array('administer domains'),
'type' => MENU_LOCAL_TASK,
'page callback' => 'domain_batch',
'file' => 'domain.admin.inc',
@@ -120,6 +125,7 @@
foreach ($batch as $key => $value) {
$items['admin/build/domain/batch/'. $key] = array(
'title' => $value['#form']['#title'],
+ 'access arguments' => array('administer domains'),
'type' => MENU_CALLBACK,
'page callback' => 'domain_batch',
'page arguments' => array($key),
@@ -130,6 +136,7 @@
}
$items['admin/build/domain/edit/%domain'] = array(
'title' => 'Edit domain record',
+ 'access arguments' => array('administer domains'),
'type' => MENU_CALLBACK,
'page callback' => 'domain_edit',
'page arguments' => array(4),
@@ -137,6 +144,7 @@
);
$items['admin/build/domain/delete/%domain'] = array(
'title' => 'Delete domain record',
+ 'access arguments' => array('administer domains'),
'type' => MENU_CALLBACK,
'page callback' => 'domain_delete',
'page arguments' => array(4),
Comments
Comment #1
agentrickardThanks. Do you have the real patch file?
If so, please file at http://drupal.org/node/243418.
Comment #2
georgw commentedObviously i didn't read that issue about the planned changes and had to find it out the hard way. ;-)
What do you mean with real patch file? Just copy the patch from above into a file (domain.patch) and you are done.
If you want to apply this patch you have to issue the following command (in the folder where domain.module is):
patch -p0 <domain.patchIf you are a Windows user you may look at http://gnuwin32.sourceforge.net/packages/patch.htm
I propose an immediate new release for 6.x with at least this patch, because my first impression of domain access was like "That's the most useless module i have ever seen". It took me a while to find out it's a bug and how to fix it.
Comment #3
agentrickardWhat do you mean with real patch file? Just copy the patch from above into a file (domain.patch) and you are done.
I mean: you should copy that to a file and attach it to this issue so that everyone else doesn't have to. That is the normal way to submit a Drupal patch.
The D6 release is a BETA, and has not caught up to the 6.2 changes because I have been busy. Your attitude -- in the last section of your comment -- is not helpful in that regard.