From 7a16cd85de302737d087ff0fc92a874023c6456a Mon Sep 17 00:00:00 2001 From: a Date: Tue, 24 Dec 2024 07:41:42 +0000 Subject: [PATCH] fix --- Cargo.lock | 17 +----- core/go | 2 +- core/rust | 2 +- docs/src/user/templating/2-plugins.md | 75 +-------------------------- infra/Sandwich-Daemon | 2 +- infra/nirn-proxy | 2 +- infra/templating-types | 2 +- services/api | 2 +- services/bot | 2 +- services/jobserver | 2 +- services/template-worker | 2 +- 11 files changed, 12 insertions(+), 98 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7ff70308..329fa5d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -192,7 +192,6 @@ dependencies = [ "async-trait", "chrono", "indexmap", - "permissions", "reqwest", "sandwich_driver", "serde", @@ -663,7 +662,6 @@ dependencies = [ "kittycat", "log", "modules", - "permissions", "poise", "rust_buildstats", "sandwich_driver", @@ -715,9 +713,9 @@ dependencies = [ "futures-util", "indexmap", "jobserver 0.1.0", + "kittycat", "log", "modules", - "permissions", "poise", "sandwich_driver", "serde_json", @@ -734,6 +732,7 @@ dependencies = [ "futures-util", "indexmap", "jobserver 0.1.0", + "kittycat", "log", "modules", "poise", @@ -2524,7 +2523,6 @@ dependencies = [ "kittycat", "log", "moka", - "permissions", "poise", "reqwest", "sandwich_driver", @@ -2824,15 +2822,6 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "permissions" -version = "0.1.0" -dependencies = [ - "kittycat", - "serde", - "serenity", -] - [[package]] name = "pin-project-lite" version = "0.2.15" @@ -3490,7 +3479,6 @@ dependencies = [ "indexmap", "kittycat", "modules", - "permissions", "rust_rpc_server", "sandwich_driver", "serde", @@ -4489,7 +4477,6 @@ dependencies = [ "mlua_scheduler", "mlua_scheduler_ext", "moka", - "permissions", "rand", "rbx_binary", "rbx_dom_weak", diff --git a/core/go b/core/go index 97acc8f0..71195ca3 160000 --- a/core/go +++ b/core/go @@ -1 +1 @@ -Subproject commit 97acc8f0be6106c1bedd709ada8c360ef1fb7933 +Subproject commit 71195ca365338a8a1ff5f5205e156116ec721a64 diff --git a/core/rust b/core/rust index 8b302c83..6493c2c3 160000 --- a/core/rust +++ b/core/rust @@ -1 +1 @@ -Subproject commit 8b302c833e388c468f04c79556f90dbc6a4fcf6f +Subproject commit 6493c2c3e12f82ee3bbe61f2160198821b9e50f3 diff --git a/docs/src/user/templating/2-plugins.md b/docs/src/user/templating/2-plugins.md index c3bfacdf..1822f4f0 100644 --- a/docs/src/user/templating/2-plugins.md +++ b/docs/src/user/templating/2-plugins.md @@ -1430,60 +1430,6 @@ Utilities for handling permission checks. ## Types -
- -### PermissionResult - -PermissionResult is an internal type containing the status of a permission check in AntiRaid. The exact contents are undocumented as of now - - - -
- -### LuaPermissionResult - -LuaPermissionResult is a type containing the status of a permission check in AntiRaid with prior parsing done for Lua. - -```json -{ - "result": { - "var": "Ok" - }, - "is_ok": true, - "code": "Ok", - "markdown": "" -} -``` - -#### Fields - -- `result` ([PermissionResult](#type.PermissionResult)): The raw/underlying result of the permission check. -- `is_ok` ([bool](#type.bool)): Whether the permission check was successful. -- `code` ([string](#type.string)): The code of the permission check. -- `markdown` ([string](#type.string)): The markdown representation of the permission check. - - -
- -### PermissionCheck - -PermissionCheck is a type containing the permissions to check for a user. - -```json -{ - "kittycat_perms": [], - "native_perms": [], - "inner_and": false -} -``` - -#### Fields - -- `kittycat_perms` ([{Permission}](#type.Permission)): The kittycat permissions needed to run the command. -- `native_perms` ([{string}](#type.string)): The native permissions needed to run the command. -- `inner_and` ([bool](#type.bool)): Whether or not the perms are ANDed (all needed) or OR'd (at least one) - -
### Permission @@ -1577,25 +1523,6 @@ Checks if a list of permissions in canonical string form contains a specific per - `has_perm` ([bool](#type.bool)): Whether the permission is present in the list of permissions as per kittycat rules. -### check_perms - -```lua -function check_perms(check: PermissionCheck, member_native_perms: Permissions, member_kittycat_perms: {Permission}): LuaPermissionResult -``` - -Checks if a permission check passes. - -#### Parameters - -- `check` ([PermissionCheck](#type.PermissionCheck)): The permission check to evaluate. -- `member_native_perms` ([Permissions](#type.Permissions)): The native permissions of the member. -- `member_kittycat_perms` ([{Permission}](#type.Permission)): The kittycat permissions of the member. - - -#### Returns - -- `result` ([LuaPermissionResult](#type.LuaPermissionResult)): The result of the permission check. - --- @@ -1665,7 +1592,7 @@ Represents a sting on AntiRaid "creator": "system", "target": "user:1945824", "state": "active", - "created_at": "2024-12-15T19:49:01.996579125Z", + "created_at": "2024-12-24T07:37:48.710918096Z", "duration": { "secs": 60, "nanos": 0 diff --git a/infra/Sandwich-Daemon b/infra/Sandwich-Daemon index 2d6c40cb..bf395b9a 160000 --- a/infra/Sandwich-Daemon +++ b/infra/Sandwich-Daemon @@ -1 +1 @@ -Subproject commit 2d6c40cb5f12755613167a1ff1fb3a3278e9e07b +Subproject commit bf395b9a220df595392a102e4201eadd014c36ba diff --git a/infra/nirn-proxy b/infra/nirn-proxy index 832fecfe..a69b5b65 160000 --- a/infra/nirn-proxy +++ b/infra/nirn-proxy @@ -1 +1 @@ -Subproject commit 832fecfeb22352eaa286a84a0b135032b4a3ba8d +Subproject commit a69b5b65a9c850128c12051e3ea098ee4c6d23d2 diff --git a/infra/templating-types b/infra/templating-types index b14afb5b..a565d8f1 160000 --- a/infra/templating-types +++ b/infra/templating-types @@ -1 +1 @@ -Subproject commit b14afb5b41d4deadc8e062e3a1678fcbbdf3fa87 +Subproject commit a565d8f1669f7f0a911e3ac5e8368a1d0edd812d diff --git a/services/api b/services/api index 6b876801..0202c628 160000 --- a/services/api +++ b/services/api @@ -1 +1 @@ -Subproject commit 6b876801fd28fc0512ec125530301923dcfbf22c +Subproject commit 0202c62845f6326f6ba6d70905e57b7ef5d762d0 diff --git a/services/bot b/services/bot index 8a6f4d3c..fa5eeee5 160000 --- a/services/bot +++ b/services/bot @@ -1 +1 @@ -Subproject commit 8a6f4d3cf4447dc81df4731cda3059f32a863d5b +Subproject commit fa5eeee54e1c47d65681b9d8ca31aa91a119b1fb diff --git a/services/jobserver b/services/jobserver index e4287f76..191742eb 160000 --- a/services/jobserver +++ b/services/jobserver @@ -1 +1 @@ -Subproject commit e4287f76c749d4fd73576eb01647934968d964d5 +Subproject commit 191742eb4dcbe9e0d472a3da5cde357bd507b236 diff --git a/services/template-worker b/services/template-worker index b7a7044d..c19af58e 160000 --- a/services/template-worker +++ b/services/template-worker @@ -1 +1 @@ -Subproject commit b7a7044d17c5cca3e23897f0ebe615865d27627e +Subproject commit c19af58ec89bd68376aea3801f2a570b0d173425