There are some problems with vbo and simple access.

1. After create a view with vbo the Form doesn’t show group names only checkboxes. Because there is an invalid attribute ‘#value’ in function simple_access_group_grant_form() use ‘#markup’ instead . Please see attached patch below.

2. After select a vbo action like ‘Grant permissions to groups’ php throw a notice like Undefined index: sa_group_permissions in simple_access_group_grant_form() because var $setting is not set correctly. Please see attached patch too.

After fix theses minor errors, I can do an action on nodes with simple access/vbo but the action has no effect. Message of simple action is: Performed Grant permissions to groups on 1234 … but rights are still the same before.

My php version is 5.4.15

What can I do?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gordon’s picture

Status: Active » Needs work
+++ b/simple_access.module
@@ -911,16 +911,19 @@ function simple_access_group_grant_form($settings = array()) {
     );
+    if(!isset($settings['sa_group_permissions'][$gid]['sa_view'])) $settings['sa_group_permissions'][$gid]['sa_view'] = 0;

This doesn't follow Drupal Coding standards

The better way to do this add the defaults to the array something like

$settings['sa_group_permissions'][$gid] += array(
  'sa_view' => 0, 'sa_update' => 0, 'sa_delete' => 0,
);
Alexander Hadj Hassine’s picture

FileSize
2.05 KB

Thanks for your answer,
I have add the defaults to an array, please see attached patch below.
But main problem is still alive. After do action rights are still the same before. No changes are made.

thalemn’s picture

I can concur that simple access changes are not applied using VBO to group permissions using Drupal 6 and VBO (I know this should probably be in the Drupal 6 version, but wanted to post it here, too).

gordon’s picture

I have taken a look at this patch, and the actions we not working at all.

I have looked into it more and here is the fixes. Can you please check these.

gordon’s picture

Status: Needs work » Needs review
gordon’s picture

Version: 7.x-2.0-rc1 » 7.x-2.x-dev
gordon’s picture

Status: Needs review » Fixed

This has been committed to dev

Status: Fixed » Closed (fixed)

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

  • Commit 68d6697 on 7.x-2.x, 8.x-3.x by gordon:
    Issue #2039471 by Alexander Hadj ..., gordon: Fixed Problems with simple...
earthangelconsulting’s picture

Issue summary: View changes

i can't figure out how to use vbo to update "simple access" configuration for nodes, or if that's even possible. is there any kind of documentation on how to do this?