Feature: Web secondary groups to be treated as primary.
hockeymikey opened this issue ยท 9 comments
Forum: Xenforo
Permissions: PEX
Config: http://pastebin.com/gd69DYTU
Using a test account I created their account on the forum. CB recognised it when the player (skiptoops) logged in and changed their in game rank to reflex the web rank.
They had a web rank of Sailor as the primary group. Their PEX rank wasn't changed in the right way.
3b0a9643-1171-48e0-b8fd-4f050f55e27f:
group:
- Sailor
options:
name: Paco33149
d2a6c6ec-18ef-4c5a-8355-3296c67aeb57:
group:
- Stowaway
- Sailor
The user in the permissions file for PEX was lacking their name which displayed their username as the default group (Stowaway) still until the options: name part was added in. Also the Sailor rank was stacked on to the user's Stowaway rank rather than change the users rank to Sailor.
Thanks
It is assigning both groups to the permissions system because only one of them is a group to be treated as primary. Guessing from your group names, you probably need to list all of them in the groups-treated-as-primary setting.
The options.name portion is part of PEX internals. It looks like their name isn't set until the first time it is fetched off the user object.
But the other groups need to be treated as secondary web side.
Then how do I get their name in there without creating a user record for every player that logins in (would get quite full and messy)
If the other groups are secondary then they don't go on the primary list. However, only groups that are on the primary list are mutually exclusive. A player can be a member of only one primary group at a time, but if there's only one primary group on the list of primary groups, that will not have much effect.
With a permissions system like PEX, that does not support the idea of primary groups, this is the way it works: Player is synchronized and is currently (on the PEX side) a member of monkeys. But on the web side their primary group has changed from monkeys to gorillas. If both of the groups are in the "groups treated as primary" list, CommunityBridge calls PEX's API twice: Once to remove the group "monkeys" and a second time to add the group "gorillas". There isn't anything in PEX's API that offers a "change primary group"...because PEX doesn't have primary groups.
The name thing I'll have to apply a work around and report the bug to PEX. :)
But what I'm saying is that have groups that are treated as secondary on the web side but are treated as primary server side. So a user is added to the gorillas secondary group on the forums but on the server his rank is removed then changed to Gorillas. And if he is apart of Gorillas on the server and is demoted to Monkeys then forum side all of his secondary groups are removed since Monkeys is the default. Or if he is changed to the Orangutans group on the server then again all of his secondary groups are removed and then he is added to secondary group of Orangutans.
Thanks!
We'll need a new option for something like that. The 'as-primary' is to work around the lack of "primary group" functionality in some permissions systems. I'd need to add a new list option, probably something like "web-secondary-groups-to-treat-as-primary-on-minecraft" ...although that is way too long.. :)
Or maybe use the existing list in both places with a option to specify whether it applies to webapp-primary, webapp-secondary, or both. Hm. that does sound better.
Second opinion sounds a little cleaner personally. This would help a lot of Xenforo users I know.
Any update on if / when this may be implemented? I think it will fix a lot of te problems with xenforo