Commit 467dbe6d authored by Jeremy Linton's avatar Jeremy Linton Committed by Ray Strode

test: Add a test case to handle actions without explicit rules

An implicit authorization parameter is provided to
polkit_backend_js_authority_check_authorization_sync() for actions
without corresponding explicit rules. Assure that is honored rather
than simply being denied.
Signed-off-by: 's avatarJeremy Linton <jeremy.linton@arm.com>
parent 85c38f36
...@@ -182,6 +182,14 @@ static const RulesTestCase rules_test_cases[] = { ...@@ -182,6 +182,14 @@ static const RulesTestCase rules_test_cases[] = {
NULL, NULL,
POLKIT_IMPLICIT_AUTHORIZATION_AUTHENTICATION_REQUIRED, POLKIT_IMPLICIT_AUTHORIZATION_AUTHENTICATION_REQUIRED,
}, },
/* actions without explict rules aren't automatically NOT_AUTHORIZED */
{
"basic2",
"net.company.productA.action2",
"unix-user:john",
NULL,
POLKIT_IMPLICIT_AUTHORIZATION_UNKNOWN,
},
/* Ordering tests ... we have four rules files, check they are /* Ordering tests ... we have four rules files, check they are
* evaluated in order by checking the detail set by each rules * evaluated in order by checking the detail set by each rules
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment