Interface AccessManager
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A manager that provides access validators for different execution contexts.
- Since:
- 1.0
- Version:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic AccessManagerCreates a manager for which all validators always allow access.static AccessManagerCreates a manager for which all validators always deny access.static AccessManagerbasic()Creates a manager that issues validators that perform simple group memebership checks (that is, a user has equivalent access to a group if and only if they belong to that group).static AccessManageroverridable(Group overrideGroup) Creates a manager that issues validators that generally perform group membership checks, but also allows a given group to override any permission in the system (that is, users that are members of the given group have equivalent permissions to any other group).Creates an access validator under the context of the given guild, channel, and caller.
-
Method Details
-
validator
Creates an access validator under the context of the given guild, channel, and caller.- Parameters:
guild- The guild of the current execution.channel- The channel of the current execution.caller- The caller that invoked the execution.- Returns:
- The appropriate access validator.
-
alwaysAllow
Creates a manager for which all validators always allow access. That is, a manager that allows access for any user to any group (effectively disabling group checking).- Returns:
- The manager.
-
alwaysDeny
Creates a manager for which all validators always deny access. That is, a manager that denies access for any user to any group (effectively disabling any functionality that requires group membership).- Returns:
- The manager.
-
basic
Creates a manager that issues validators that perform simple group memebership checks (that is, a user has equivalent access to a group if and only if they belong to that group).- Returns:
- The manager.
-
overridable
Creates a manager that issues validators that generally perform group membership checks, but also allows a given group to override any permission in the system (that is, users that are members of the given group have equivalent permissions to any other group).- Parameters:
overrideGroup- The group that overrides any permission check.- Returns:
- The manager.
-