hi,

simple access appears a nice approach to access rights! thanx.

i set up a fresh drupal 4.7 beta 6 and added 3 users.

i downloaded simple_access from drupal.org.

if i try to create content with a user different from my masteruser i receive the following error:

warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/apache2/drupal-4.7.0-beta6/modules/simple_access/simple_access.module on line 149.

i deactivates simple_access, removed the tables, replaced the files by the lates cvs version, loaded the tables into the db and enabled the module -> same result.

markus

CommentFileSizeAuthor
#2 simple_access_0.module28.66 KBMojah

Comments

micahw156’s picture

Title: no user except masteruser can create content in beta6 and simple_acess » possible workaround

I found a possible workaround for this issue: In admin/access, I granted "assign access to nodes" under the simple_access module to the users who have rights to create nodes, and now those users do not get the error. I would think that there need to be some sort of defaults put in place for those users who shouldn't have this grant access, but at least I can continue to use this module while a final fix is determined.

Mojah’s picture

Title: possible workaround » incorrect simple_access.module form called
Status: Active » Reviewed & tested by the community
StatusFileSize
new28.66 KB

Refer to this node ( by http://drupal.org/user/21167 ) for a patch that must be made to the simple_access.module
http://drupal.org/node/63950

It will resolve the disactivation issue.

The wrong form is being called.

On line 442 replace
$output .= drupal_get_form('simple_access_deactivate', $form);
with
$output .= drupal_get_form('simple_access_setup_page', $form);

I tested and it works fine. The working .module file is attached.

LazarusLong-1’s picture

Version: master » 4.7.x-1.x-dev

I think the patch submitted by Mojah is correct but off-topic. It seems to patch the deactivation issue, not the bad function call on line 149.

I've tried with a cast to array on line 149, that is

$form = array_merge($form, array(simple_access_form($form['#node'])));

instead of

$form = array_merge($form, $simple_access_form);

and it seems to work. But not really tested by now.

Hope it helps.

gordon’s picture

Status: Reviewed & tested by the community » Fixed

I fixed this a week or so ago in CVS, I have back ported this to 4.7

Anonymous’s picture

Status: Fixed » Closed (fixed)