You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
publicoverridevoidLoad(boolhotReload){AddCommand("css_ban","Ban a player",OnCommand);}[RequiresPermissionsOr("@css/ban","@something/else")][CommandHelper(minArgs:1,usage:"[id]",whoCanExecute:CommandUsage.CLIENT_ONLY)]publicstaticvoidOnCommand(CCSPlayerController?caller,CommandInfoinfo){if(caller==null)return;info.ReplyToCommand("Hello World!");}
Confirmed on API version: v291 (1.0.291+6349c11)
The text was updated successfully, but these errors were encountered:
To clarify,
I think the intended behavior should be that access to the command should be granted, because required permission is @css/ban OR @something/else and since admin has @css/root which enables all @css flags including @css/ban, the requirement is met.
rothadamcz
changed the title
[BUG] @css/root flag does not work with RequiresPermissionsOr annotation
[BUG] @domain/root flag does not work with RequiresPermissionsOr annotation
Dec 3, 2024
When admin has
@domain/root
flag, it is ignored when using RequiresPermissionsOr annotation.Example
@css/root
)@css/ban
nor@something/else
flag.Confirmed on API version: v291 (1.0.291+6349c11)
The text was updated successfully, but these errors were encountered: