Interface Permission
- All Known Implementing Classes:
PermissionProvider
Permission interface to manage permissions.
-
Method Summary
Modifier and TypeMethodDescriptiongetPermissions(int userId) Retrieves a list of permissions for a user based on their user ID.booleanhasPermission(int userId, String permission) Checks if a user identified by their unique user ID has a specific permission.booleanhasPermission(UUID uuid, String permission) Checks if a user identified by their unique UUID has a specific permission.voidReloads or refreshes any expired entities or permissions within the system.
-
Method Details
-
getPermissions
Retrieves a list of permissions for a user based on their user ID. This includes both the user's direct permissions and those inherited from parent entities.- Parameters:
userId- The unique identifier of the user whose permissions are to be retrieved.- Returns:
- A list of all permissions applicable to the specified user.
-
loadExpired
void loadExpired()Reloads or refreshes any expired entities or permissions within the system. This method is intended to invoke expiration-related updates for underlying group and user components. -
hasPermission
Checks if a user identified by their unique UUID has a specific permission.- Parameters:
uuid- The universally unique identifier (UUID) of the user.permission- The permission string to check for the user.- Returns:
trueif the user has the specified permission, otherwisefalse.
-
hasPermission
Checks if a user identified by their unique user ID has a specific permission.- Parameters:
userId- The unique identifier of the user to check permissions for.permission- The specific permission string to verify for the user.- Returns:
trueif the user has the specified permission, otherwisefalse.
-