utils_BitwiseOperations.js

/**
 * Checks if a given permission bit is present in the current permissions.
 *
 * @param {number} currentPermissions - The current permissions as a bitwise integer.
 * @param {number} permissionBit - The permission bit to check for.
 * @return {boolean} Returns true if the permission bit is present in the current permissions, false otherwise.
 */
function hasPermission(currentPermissions, permissionBit) {
  return (currentPermissions & permissionBit) === permissionBit;
}


module.exports = {
  hasPermission,
};