Skip to content

[BUG] @domain/root flag does not work with RequiresPermissionsOr annotation #699

@rothadamcz

Description

@rothadamcz

When admin has @domain/root flag, it is ignored when using RequiresPermissionsOr annotation.

Example

  • Admin has only 1 flag (@css/root)
  • He is not able to execute css_ban (command implementation bellow), because he does not have @css/ban nor @something/else flag.
public override void Load(bool hotReload)
{
    AddCommand("css_ban", "Ban a player", OnCommand);
}

[RequiresPermissionsOr("@css/ban", "@something/else")]
[CommandHelper(minArgs: 1, usage: "[id]", whoCanExecute: CommandUsage.CLIENT_ONLY)]
public static void OnCommand(CCSPlayerController? caller, CommandInfo info)
{
    if (caller == null) return;

    info.ReplyToCommand("Hello World!");
}

Confirmed on API version: v291 (1.0.291+6349c11)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions