Attribute Macro actix_grants_proc_macro::has_any_permission
source · #[has_any_permission]
Expand description
Macro to сheck that the user has any of the specified permissions.
§Examples
use actix_web_grants::proc_macro::has_any_permission;
use actix_web::HttpResponse;
// User should be ADMIN or MANAGER
#[has_any_permission["ROLE_ADMIN", "ROLE_MANAGER"]]
async fn macro_secured() -> HttpResponse {
HttpResponse::Ok().body("some secured info")
}