SecurityManager class
Security manager that validates commands and paths.
Constructors
- SecurityManager(SecurityConfig config)
Properties
- config → SecurityConfig
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isCommandAllowed(
String command) → PermissionResult - Check if a command is allowed.
-
isPathAllowed(
String path) → PermissionResult - Check if a file path is allowed.
-
isUserAllowed(
int userId, List< int> allowedUsers) → bool - Check if a user is allowed for a specific bot.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withOverrides(
SecurityConfig? overrides) → SecurityManager - Create a new security manager with overrides.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
alwaysAllowed
→ const List<
String> - Commands that are always allowed (safety commands).