feat: bitwise RBAC engine with channel-level permission overrides
Replace string-based role checks (role === 'admin') with a bitwise BigInt permission system. Adds computePermissions() resolution engine following Discord's model: @everyone base → role union → admin shortcut → channel overrides (role deny/allow → member deny/allow). Ready payload now filters channels by VIEW_CHANNEL and attaches per-user myPermissions to each server and channel. Includes channel_overrides table, @everyone role auto-creation, migration for existing servers, and override CRUD API.
This commit is contained in:
@@ -6,7 +6,9 @@
|
||||
"main": "./src/types.ts",
|
||||
"types": "./src/types.ts",
|
||||
"exports": {
|
||||
".": "./src/types.ts"
|
||||
".": "./src/types.ts",
|
||||
"./src/permissions": "./src/permissions.ts",
|
||||
"./src/permissions.js": "./src/permissions.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
|
||||
Reference in New Issue
Block a user