AuthMe / AuthMeReloaded

The best authentication plugin for the Bukkit/Spigot API!
https://www.spigotmc.org/resources/authmereloaded.6269/
GNU General Public License v3.0
618 stars 514 forks source link

GroupOptions (registeredPlayerGroup) doesn't work with LuckPerms #2308

Open MobButcher opened 3 years ago

MobButcher commented 3 years ago

What behaviour is observed:

When setting up AuthMe Extended, I tried to configure the GroupOptions settings to strip away all of the permissions and force users into notlogged group while they are in the unlogged-in limbo. Unfortunately, it doesn't work: it strips away all of the other permission groups, but it does not add the one configured in the AuthMe's config.

What behaviour is expected:

When configured as shown below, when person is not logged in, they have only two LuckPerms groups assigned: default and notlogged.

Steps/models to reproduce:

Set up as listed below; log out and log back in (without session).

Plugin list:

Vault, LuckPerms, AuthMe.

Environment description

Standalone server on Purpur 1.16.5 build 1038 (fork of Paper), no SQL.

AuthMe build number:

v5.6.0 snapshot, build 2448 LuckPerms v5.3.3

Error Log:

None.

Configuration:

AuthMe:
GroupOptions:
    enablePermissionCheck: true
    registeredPlayerGroup: 'notlogged'
    unregisteredPlayerGroup: 'notlogged'
    unLoggedInGroup: 'notlogged'

LuckPerms:
storage-method: YAML

notlogged.yml:
name: notlogged
permissions:
- authme.player.*
- '*':
    value: false
- essentials.motd
FunkyNico commented 2 years ago

I was wondering why the GroupOptions of Authme doesn't work properly with Luckperms, tried changing the config of both with no results.

But i notice that the group i has designed for the unregistered or unlogged players keeps onto the user luckperms file as the primary role, but the actual role for the registered players adds as a parent group, so the player has both of the roles at the same time. I have enabled the option on luckperms config to "prevent-primary-group-removal: false" so i can teorictly change the primary group without adding it as a parent group, but Authme keeps adding it as a parent group. The result is that when you log in and you're registered you have the registered player role, but when you login come back to the unregisted or unlogged rol.

LuckPerms: v5.4.41 LuckPerms config.yml: https://paste.enginehub.org/zHdw6q4Wo

Authme Reloaded: 5.6.0-SNAPSHOT-b2583 Authme config.yml: https://paste.enginehub.org/ArUZgCFDc Vault: v1.7.3-b131

Server: Sakura-"d4c7a0e" (MC: 1.18.2)