Expand description
The ‘whitelist’ module provides CRUD operations for managing a whitelist.
The whitelist is a HashMap where each principal is mapped to a boolean value.
A principal is considered whitelisted if it maps to true
.
Constants§
- WHITE_
LIST - A thread-local storage for the whitelist, mapping principals to their whitelisted status.
Functions§
- add_
to_ whitelist - Adds a principal to the whitelist.
- is_
whitelisted - Checks if a principal is whitelisted.
Returns
true
if the principal is whitelisted, otherwisefalse
. - remove_
from_ whitelist - Removes a principal from the whitelist.