Posted by Mr.T. on February 6, 2009 at 11:35am
Jump to:
| Project: | Simple Access |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Mr.T. |
| Status: | postponed (maintainer needs more info) |
Issue Summary
When i want to create a new profile, the adjustments for the attributes view, edit, delete will not be saved in database.
The reason are the wrong keys for the associates array $access in file "simple_access.admin.inc" in line 218. They must be called "sa_view", "sa_update" and "sa_delete" instead of "view", "update" and "delete".
After fixing this line my selections will be saved, but the roles still does not work.
When i tried to edit a node and set the checkbox for a profile, the settings for this profile are ignored.
Can or will you fix it in the near future or are the profiles a feature for next versions.
Comments
#1
Hello
Still same issue here with RC3...
I made some Access group...
Then I add an Access profil
set checkbox some attributes view, edit and delete for an Access group and submit...
If I re-edit Access profil all previous settings checkbox attributes are undone...
I missing something...
Thank
#2
I confirm.
rc3 still have this bug - marking as critical
#3
Try this with rc4 as I fixed these bugs there.
#4
hey all...i have one site running 6.x-2.0-rc1 and another running 6.x-2.0 (the new release) and i have just found out that Access Profiles don't work on either of them (though the rest of the module does, and it's AWESOME! big thanks to those who wrote this!)
i just upgraded one of them from 6.x-2.0-rc6, before i checked the Access Profiles, maybe it works on that version? i should reinstall the old one and find out...
any chance we could get this fixed? I am guessing that the bug got re-introduced before the new release, due to some kind of version control accident?
cheers
Peter 'Fish' Fisera
GoatVirus Consulting
#5
i have compared most of the files between 6.x-2.0 (the new one) and 6.x-2.0-rc4 (where this bug was fixed, according to #3) and can't find a difference that would account for this not working...
#6
I have fixed it in commit http://drupal.org/cvs?commit=303384 so if you can check it and let me know I will release 2.1 to fix it.
#7
I just checked the D7 version and I had fixed this. I just had not backported it. Grrrr!!!
#8
hey Gordon, I applied the diff described in #6 http://drupalcode.org/viewvc/drupal/contributions/modules/simple_access/... to an install of 6.x-2.0 (the new release)... and it worked! thanks so much for fixing this, it is much appreciated! nice module, sir.
cheers
Fish
GoatVirus Technologies
http://goatvirus.com
#9
ok, found ANOTHER bug, maybe one that was fixed before and then accidentally re-introduced
re: latest dev release 6.x-2.x-dev, Dec 17, 2009
see line 283 of simple_access.module (in function simple_access_node_grants)
$grants['simple_access_profiles'] = $pids;
should be:
$grants['simple_access_profile'] = $pids;
trust me on this... i made this fix to my local copy, and now profiles are working as expected :-)
cheers
Peter "Fish" Fisera
GoatVirus Technologies
#10
Updated a few days ago from CVS :
I found 'assign profiles to profiles' instead of 'assign access to profiles'
:-(
/**
* Implementation of hook_perm().
*/
function simple_access_perm() {
return array('manage simple access', 'assign access to nodes', 'assign access to profiles', 'assign owner permissions');
}
Please update on CVS
#11
thanks bloggybusiness, i found that one too, just hadn't posted it yet!
and one more... in function simple_access_form
//BUG FIX - following line changed Feb 1, 2009 - Peter Fisera, GoatVirus Technologies
//(because checkboxes control expects an array of defaults, then if node->simple_access_profiles is null or empty string
//instead of an empty array, an error will result in function form_type_checkboxes_value in includes/form.inc )
//'#default_value' => $node->simple_access_profiles,
'#default_value' => (is_array($node->simple_access_profiles) ? $node->simple_access_profiles : array()),
seems to me that Simple Access is a great and useful module except that the Access Profiles feature (which I am guessing hardly anyone uses) was never tested to the same degree as the rest of it :-)
still, i'd rather chase down the odd bug than have written this one from scratch
cheers
Fish