Module whitelist

Source
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, otherwise false.
remove_from_whitelist
Removes a principal from the whitelist.