LuckPerms

LuckPerms

41.4k Downloads

Primary groups does not take context

Rakdos8 opened this issue · 23 comments

commented

Hi there,

I ran into an issue (I think ?) or it behave weirdly. I've created 2 other groups: citizens and staff-context to keep the track as : default > citizens > staff-context
cf:
group parents

Then I try to /lp user bathman18 parent set staff-context server=skyblock but it looks like LuckPerms consider that bathman18 lost his primary group and add default back. But LuckPerms consider the context to be matching and print his prefix and so on.
Yet, his prefix does not apply in game.
After set parent
I've run a verbose here:
Verbose
Verbose details

Yet, if I remove the context server=skyblock for bathman18 it looks like the group is applied correctly and prefix is attached as well
After set parent 2

I thought I was running the same issue as #2270 but here is my config.yml:

server: skyblock
include-global: true
include-global-world: true
apply-global-groups: true
apply-global-world-groups: true

primary-group-calculation: all-parents-by-weight # I've also tried parents-by-weight with no success
meta-value-selection-default: highest-number # I've tried inheritance with no success

The idea below that is to have one staff per server and not sharing permissions all around.

Thank you :)

PS: The 2nd example is strictly what we're looking for: https://github.com/lucko/LuckPerms/wiki/Advanced-Setup

commented

But if I replace the server: skyblock into server: global from the config.yml and define a static-context:

{
  "static-contexts": {
    "server": "skyblock"
  },
  "default-contexts": {}
}

It looksl ike LuckPerms take, correctly, in account the primary group
context global

The static-contexts has no effect with server: skyblock

Here is the definition of prefixes for the group staff-context
prefixes

commented

You should not need to touch context.json at all. Just base your context on servername defined in server: servername in LP config.yml for all backend servers.

commented

You should not need to touch context.json at all. Just base your context on servername defined in server: servername in LP config.yml for all backend servers.

Exactly, but when I put the server: server-name it does not take in account the true primary group so what am I missing ?

commented

The prefix as well as the primary group is correct in lp user USER info tho. Ensure you have vault plugin if you are displaying either using another plugin

commented

I'm using Vault (1.7.2) and EssentialsXChat (2.17.2.117)

commented

The thing is the prefix as well as the primary group is the same regardless of the context. So I doubt its due to the context. Screenshot lp user USER meta info

commented

Have you looked at the issue Ben?

It's full of those screenshots...

commented

Oh. My bad I missed the meta in the command.

commented

Here is /vault-info suggested in the wiki:
vault-info

And the meta info lp user USER meta info:
meta-info

commented

I can dump the database (MySQL) if you want to give a try

commented

Bump.
Any news on this ?

commented

I’d like to add that this also appears to affect prefixes. Using the trick with the static contexts fixed that too.

commented

I’d like to add that this also appears to affect prefixes. Using the trick with the static contexts fixed that too.

Permissions are also affected if I remember well.
Also, if I define a static context and keep the server: server-name in the config.yml it won't work unless I set it to server: global

commented

Will need to look into this in a bit more detail - very limited on time at the moment but I'll try get to it soon.

commented

Any idea on when it will be fixed or looking for resolution ?

commented

Please fix this issue as it still doesn't work.

commented

Any update since ?

commented

It's been 2 months now. Can I do anything to help fixing this issue ?

commented

Actually, looks like the latest version (5.1.107) solves the issue.
I can only hope that you know what you've done to fix this issue which won't happen next time ;)

image

commented

This still doesn't work for me. I'm fully updated too

commented

Have you tried the 5.1.107 version ?
Also, we might have changed some default config values such as :

primary-group-calculation: all-parents-by-weight

inheritance-traversal-algorithm: depth-first-pre-order

context-satisfy-mode: at-least-one-value-per-key

include-global: true
include-global-world: true
apply-global-groups: true
apply-global-world-groups: true

meta-value-selection-default: highest-number
commented

These settings kind of broke my ranks and doesn't work still. I've reverted back to how they were. I guess I'm gonna have to wait till they fully fix it without having to change settings.

commented

Pretty sure alll but the first are default values there.

Guys. Please don't randomly change these values if you don't understand them. The defaults are perfectly fine.