Hi,
I created custom policy templates and policies, roles, member groups etc. that I use for almost all of my customers. Until now I always created these manually, but especially creating the policy templates (and comparing them line by line while doing so) is rather tedious.
I'd like to copy the database tables
<prefix>_access_context
<prefix>_access_permissions
<prefix>_access_policies
<prefix>_access_policy_template_groups
<prefix>_access_policy_templates
<prefix>_member_groups
<prefix>_membergroup_names
<prefix>_user_group_roles
to the site I'm working on (MODX is already installed). I'd expect that to work, but now I saw that there are differences in the <prefix>_access_permissions regarding the IDs - for example, the "dashboards" permission seems to have added later in the old site I'd like to use as source (ID 14 in the new site, ID 159 in the old site), and all following IDs are different because of that.
I guess the IDs aren't used within MODX (in <prefix>_access_policies the permissions are referenced by name), but I'm not absolutely sure - I don't want to totally mix up the permissions. Does anyone know if I can safely copy the named tables to the new MODX installation?
And a bonus question: What does the "principal" column in <prefix>_access_context mean?
Thanks in advance!
Cheers,
Jan
This message has been ROT-13 encrypted twice for higher security.
-
☆ A M B ☆
- 279 Posts
I have exported (xml) my own policy templates and policies. The usergroups etc. cannot be exported as far I know, but it is a lot faster working when you just can import the policies etc. You'd only need to create the usergroups and give them the right context-access permissions.
You're right - I totally forgot about the export feature... :-/
Thank you very much, I guess that's the way to go (although it would still be easier and faster to copy the tables directly using Navicat).
Cheers,
Jan
This message has been ROT-13 encrypted twice for higher security.
-
☆ A M B ☆
- 279 Posts
Yeah but then you're causing errors I think, so..
Maybe the thing you better can do is creating an package for yourself which sets all you want. I also want to make this, and at install I want to enter the site_name and stuff like that.. It will also set my system settings right etc. etc. It can do the permission stuff also ;-)
Quote from: bertoost at Dec 14, 2012, 02:17 AMYeah but then you're causing errors I think, so..
Well, I'm not sure - I guess the IDs aren't used anywhere, but at the moment I don't have any spare time to test it.
Quote from: bertoost at Dec 14, 2012, 02:17 AMMaybe the thing you better can do is creating an package for yourself which sets all you want. I also want to make this, and at install I want to enter the site_name and stuff like that.. It will also set my system settings right etc. etc. It can do the permission stuff also ;-)
That's already on my list. I hope I find some time soon. There's always very much work to be done in November/December, but this year it's absolutely crazy...
Cheers,
Jan
This message has been ROT-13 encrypted twice for higher security.