ACEmulator / ACE

Asheron's Call server emulator.

Home Page:https://emulator.ac

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sessions with an intended AccessLevel of 2 are granted AccessLevel 3

FlaggAC opened this issue · comments

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Repro steps.

Grant an account AccessLevel 2 via a sql query update ace_auth.account set accesslevel = 2 where ...
Log in as that user
Delete a lifestone or a player's wielded weapon with the /delete command

The log given by the failure.

No log, but here are the exact lines of code detailing the issue

bool isEnvoy = isSentinel; // TODO: Add more resolution to player levels so we can separate IsEnvoy from IsSentinel

[CommandHandler("delete", AccessLevel.Envoy, CommandHandlerFlag.RequiresWorld, 0, "Deletes the selected object.", "Players may not be deleted this way.")]
public static void HandleDeleteSelected(Session session, params string[] parameters)

Desired functionality.

Any command marked as AccessLevel.Envoy should require an AccessLevel of 3, not 2.

Mention any other details that might be useful.

For reference: another line of code that may be useful for fixing https://github.com/ACEmulator/ACE/blob/master/Source/ACE.Server/WorldObjects/Player.cs#L151