From c0bf614ccc7945abc06d5a583497582717c3c41f Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 27 Jun 2025 13:28:00 -0600 Subject: style: reformat the cedar policy --- etc/authzd/policy0.cedar | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'etc') diff --git a/etc/authzd/policy0.cedar b/etc/authzd/policy0.cedar index e01182c5..034e81b5 100644 --- a/etc/authzd/policy0.cedar +++ b/etc/authzd/policy0.cedar @@ -1,19 +1,20 @@ permit(principal, action == Action::"check", resource) when { - context has bearer_token && + context has bearer_token && context.bearer_token == "valid-token" }; permit(principal, action == Action::"check", resource) when { - context has path && - (context.path like "*.css" || - context.path like "*.js" || - context.path like "*.ico" || - context.path like "*.png" || - context.path like "*.jpg" || - context.path like "*.jpeg" || - context.path like "*.gif" || - context.path like "*.bmp" || - context.path like "*.html") + context has path && ( + context.path like "*.css" || + context.path like "*.js" || + context.path like "*.ico" || + context.path like "*.png" || + context.path like "*.jpg" || + context.path like "*.jpeg" || + context.path like "*.gif" || + context.path like "*.bmp" || + context.path like "*.html" + ) }; -- cgit v1.2.3