It is PoC patch which implements an Authorisation back end for ExternalCommand. It is still in progress.
Depends upon D21773
Details
- Reviewers
stikonas cjlcarvalho - Commits
- R16:202bc48b16a0: [WIP]: Implement PolkitQt1 Authorization backend
R16:1d341559ceda: [WIP]: Implement PolkitQt1 Authorization backend
R16:6e659ac6ac11: [WIP]: Implement PolkitQt1 Authorization backend
R16:01a840da8b5d: Merge branch 'qdbus' into auth-backend
R16:09fe99e520a6: Revert "Merge branch 'qdbus' into auth-backend"
Compiles
Diff Detail
- Repository
- R16 KPMCore
- Branch
- auth-polkit
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 13869 Build 13887: arc lint + arc unit
Correct documentation error.
@stikonas I will be making more changes to it and will implement those Q_SLOTS soon.
(sendProgressStep())
src/util/externalcommand.cpp | ||
---|---|---|
386 | spelling, executeAction() | |
src/util/externalcommand_polkitbackend.cpp | ||
93 | I'll have to read a bit more about polkit, but this requirement sounds strange. It shouldn't be necessary to have kde-authentication-agent-1. Some users might be on other desktop environments and use their own polkit authentication agent, e.g. polkit-gnome-authentication-agent-1. |
src/util/externalcommand_polkitbackend.h | ||
---|---|---|
51 | We don't need Q_PLUGIN_METADATA in kpmcore. I think we'll only support PolkitQt1, so we won't be loading authentication backendslike KAuth. |
Authenticate org.kde.kpmcore.externalcommand.init action inside ExternalCommand::startHelper() using Polkit Backend
@stikonas Below error is troubling me for sometime.
function ‘bool ExternalCommand::startHelper()’:
/home/aryan/kde/src/kpmcore/src/util/externalcommand.cpp:388:14: error: invalid use of incomplete type ‘class PolkitQt1Backend’
m_authJob->initPolkitAgent(QStringLiteral("org.kde.kpmcore.externalcommand.init"), parent); ^~
In file included from /home/aryan/kde/src/kpmcore/src/util/externalcommand.cpp:27:0:
/home/aryan/kde/src/kpmcore/src/util/externalcommand.h:41:7: note: forward declaration of ‘class PolkitQt1Backend’
class PolkitQt1Backend;
src/util/externalcommand.cpp | ||
---|---|---|
183 | these connect gives error and correctly so because of m_authJob. Any suggestion how to tackle? Ditto at line 377 |
src/util/externalcommand.cpp | ||
---|---|---|
183 | Well, report progress used KAuth, Now progress will have to be sent via DBus message. So ExternalCommandHelper class will act as DBus client and send messages to ExternalCommand class. Comment it out for now. It will obviously make kpmcore not fully functional until it is reimplemnted, but I think it might still work (just no progress reporting). |
src/util/externalcommand.cpp | ||
---|---|---|
183 | progress() and reportProgress() signals have been reimplemented in the qdbus patch. We are now NOT using KAuth's HelperSupport::reportProgress() function which internally used to emit the signal. |