Page 1 of 1

[1.1.53] LuaPermissionGroup has different behaviour with players in some cases

Posted: Tue Feb 15, 2022 7:48 am
by ZwerOxotnik
Expected:
  • Players without admin permissions can be moved to a different permission group by a mod/command/script
Steps to reproduce:
  • Create new permission groups with names like: "1", "2", "3" etc via a mod or manually
  • Demote an admin using /demote nickname
  • Change its permission group via command/script
Actual Results: Notes:

Re: [1.1.53] LuaPermissionGroup has different behaviour with players in some cases

Posted: Tue Feb 15, 2022 9:28 am
by boskid
Thanks for the report, however this is literally how it was implemented: LuaPermissionGroup does an extra permission check when used as part of console command: in that case it checks if player is an admin and has the EditPermissionGroup permission. There are various checks like that in code, like LuaPlayer::admin (write) will fail when used as part of console command by a player which is not an admin.

Re: [1.1.53] LuaPermissionGroup has different behaviour with players in some cases

Posted: Tue Feb 15, 2022 10:12 am
by ZwerOxotnik
If I understand correctly, I just should use such actions in different events instead. (though, it seems strange)