Roles, and the escalation guard
const roles = P.defineRoles({
viewer: ["chat.VIEW_CHANNEL"],
moderator: ["chat.VIEW_CHANNEL", "chat.MANAGE_MESSAGES"],
});
P.canGrant(actorPerms, roles.moderator); // false unless the actor holds every bitcanGrant closes the classic hole where a moderator mints an ADMINISTRATOR
role and assigns it to themselves.