0.34.13_cleaup_code
This commit is contained in:
1 parent
ec46a96a29
commit
5c2e50ec06
87 files changed
+4890
-1338
No files matched your search
@@ -21,13 +21,16 @@ fn general_api_token_allowed(method: &Method, path: &str, permission: &str) -> b
|
||||
| "/api/metrics/json"
|
||||
| "/api/metrics/summary"
|
||||
| "/api/cache/bans"
|
||||
) || (method == Method::GET
|
||||
&& path.strip_prefix("/api/config/")
|
||||
)
|
||||
|| (method == Method::GET
|
||||
&& path
|
||||
.strip_prefix("/api/config/")
|
||||
.is_some_and(|section| ConfigSection::from_name(section).is_some()));
|
||||
let write = permission == "rw"
|
||||
&& ((method == Method::PUT
|
||||
&& (path == "/api/config"
|
||||
|| path.strip_prefix("/api/config/")
|
||||
|| path
|
||||
.strip_prefix("/api/config/")
|
||||
.is_some_and(|section| ConfigSection::from_name(section).is_some())))
|
||||
|| (method == Method::POST
|
||||
&& matches!(
|
||||
|
||||
Reference in new issue
Block a user