Permission combination

Cheesegrits

Active member
OK, for a brief, shining moment I thought I understood permission combinations. Now I realize I don't. And I realize that perhaps I don't need to.

My specific task is writing a jFusion bridge, between Joomla! and XF, using J! as the master, and XF as the slave. So users are created and modified in J!, and changes are applied to XF via the bridge plugin. The code runs on the J! side, so modifications are currently done by poking around directly in the xf_ tables, not through the XF API.

[Yes, I know, I shouldn't do that. And at some point I'll work out how to instantiate XF inside a J! system plugin, and actually do it "the right way" by calling the XF functions to do all this. But for now, it is what it is. I inherited this code from the original author because I need it working "now" on my site, and I don't have time to do a bottom up rewrite.]

So my question is ... when adding XF users and setting their primary and secondary memberships, or when editing existing users to change their secondary group memberships, do I even need to worry about permission combinations?

What I'm doing at the moment is, on user creation I don't do anything. On user edit, I look to see if there is an xf_permission_combination row which matches the userid being modified, and their pre-change membership list, and if so, I modify it to change the group memberships to the new list.

This is just a wild guess at what needs to happen, now that I realize I actually have no real clue what the permission combinations are for. :)

TIA for any help.

-- hugh
 
Yeah, I found that thread, and have a fork of the jFusion bridge I'm working on in the background, to replace all direct table access with API calls. But I'm having issues with instantiating XF inside J!, for gory reasons I'm still working on.

So for now, I just need to make sure the "poke the tables directly" method the current code uses isn't going to hose anything up. And the only bit I'm not sure about at the moment is that permission combination table.

-- hugh
 
So for now, I just need to make sure the "poke the tables directly" method the current code uses isn't going to hose anything up.
But it will:p

It won't run any addoncode which is "hooked" to the DW, it won't update the caches, etc...

It's worth to do it the right way;)
What problem do you have with the J Bridge?
 
Oh, trust me, I know it's worth doing it the right way, and I'm working on a branch of the code to do just that. But I needed the bridge working "now", for my newly migrated site, so I had to take over ownership of the orphaned jFusion / XF plugin, and I'm very short on time (to put it mildly). So I've gotten the bridge working as-is, with a couple of days work to bring it up to date with J! 2.5 / jF 1.8 / XF 1.1, bug fixed, and adding the "advanced" group handling, with a configurable usergroup map.

So it's currently working on my live site, and seems to be working OK. But the original code has several comments about needing to research the "permissions combinations", so I did that ... with little success. I kinda get what they do, but all I need to understand right now is in what circumstances I actually need to modify the main xf_permission_combination table.

As I said up there ^^, I suspect that the only check I need is when modifying a user's group memberships, to see if there is an existing row which matches the user being changed (with their pre-change group list) and if so, modify it to match the new group list.

-- hugh
 
Back
Top Bottom