mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
feat(users): add API key install sessions
This commit is contained in:
@@ -468,6 +468,20 @@ pub(super) fn classify_public_support_route(
|
||||
"user:self",
|
||||
false,
|
||||
))
|
||||
} else if method == http::Method::POST
|
||||
&& has_single_nested_suffix_after_prefix(
|
||||
normalized_path,
|
||||
"/api/users/me/api-keys/",
|
||||
"install-sessions",
|
||||
)
|
||||
{
|
||||
Some(classified(
|
||||
"public_support",
|
||||
"users_me",
|
||||
"api_key_install_session_create",
|
||||
"user:self",
|
||||
false,
|
||||
))
|
||||
} else if method == http::Method::POST
|
||||
&& normalized_path.starts_with("/api/me/management-tokens/")
|
||||
&& normalized_path.ends_with("/regenerate")
|
||||
@@ -659,6 +673,17 @@ pub(super) fn classify_public_support_route(
|
||||
"public:system_catalog",
|
||||
false,
|
||||
))
|
||||
} else if method == http::Method::GET
|
||||
&& (has_single_segment_after_prefix(normalized_path, "/install/")
|
||||
|| has_single_segment_after_prefix(normalized_path, "/i/"))
|
||||
{
|
||||
Some(classified(
|
||||
"public_support",
|
||||
"install",
|
||||
"script",
|
||||
"public:install",
|
||||
false,
|
||||
))
|
||||
} else if method == http::Method::GET && normalized_path == "/test-connection" {
|
||||
Some(classified(
|
||||
"public_support",
|
||||
|
||||
Reference in New Issue
Block a user