Closed (fixed)
Project:
Secure Permissions
Version:
6.x-1.0
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 May 2010 at 15:37 UTC
Updated:
20 Jun 2010 at 20:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
damienmckennaThe problem appears to be secure_permissions_build_roles() which is called at the start of secure_permissions_export(). This function goes through all of the roles and deletes any of them that are not loaded through the hooks. If this is the case, how are you supposed to export anything - It just deletes everything before you try to export anything?
Comment #2
damienmckennaI think the key confusion stems from the difference between using the 'secure_permissions_active' variable versus the 'secure_permissions_disable_forms' variable. It is definitely not clear that when 'secure_permissions_disable_forms'=FALSE (i.e. the "Disable permissions and roles forms" checkbox is unchecked), when you go to export that it'll only export what already has been exported. At the very least there needs to be warnings in place to inform the admin that the module needs to be made inactive first, or better yet change the module's workflow so that it does NOT purge the role and permissions tables of any roles not previously exported.
Comment #3
damienmckennaHere's a patch that stops the permissions from being rebuilt if secure_permissions_disable_forms==FALSE.
Comment #4
damienmckennaComment #5
agentrickardLooking at this after a while away, I'm not sure why we run secure_permissions_rebuild() at the top of the export function anyway. I think the assumption was that you were ready to export and had configured things properly. But that's a dumb assumption.
I don't think that function is the proper place for the kill check you're adding. We should either remove the secure_permissions_rebuild() or wrap it in a check:
Comment #6
agentrickardThe proposed patch, but we might (as I said) just remove the rebuild.
Comment #7
agentrickardCrap, I've got a CVS issue. Ignore that patch.
Comment #8
agentrickardOK. Better.
Comment #9
agentrickardI simply removed the rebuild call.