Add a note that the 'session' and 'always' values are meaningless with
the polkit-1 backend, and explain what they actually do.
While at it, also explain what happens when the attribute is not used.
Details
- Reviewers
davidedmundson - Group Reviewers
Frameworks - Commits
- R283:8352c0d49eeb: Expand documentation of Persistence attribute
Diff Detail
- Repository
- R283 KAuth
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Polkit-1 has the a concept of persistence, under a different name. A policy can be set to:
- auth_admin
- auth_admin_keep
policy-gen-polkit1.cpp chooses between these using the persistence flag
if (!action.persistence.isEmpty() && policy != QLatin1String("yes") && policy != QLatin1String("no")) { policy += QLatin1String("_keep"); }
Which is saying if persistence is set to anything and the policy is either "auth" or "auth_self" append "_keep"
Granted that doesn't match the current docs, but WRT D6198 we can delete that persistence attribute and it won't linger.
In policy-gen.cpp there is this condition
if (persistence != QLatin1String("session") && persistence != QLatin1String("always")) { qCritical("Wrong persistence: %s", persistence.toLatin1().data()); exit(1); }
So, if there is persistence then it can't be just set to anything, it has to be either 'session' or 'always', then only it would append '_keep'.
Right, there's 2 valid options if it's set, session and always. Which as you say behave the same.
and an implicit third option, not setting it at all. Which does have a different behaviour to the above.
I think that needs clearing up in the docs with a line:
" - not set: authorization will be queried every time"