Skip to content

Commit

Permalink
fix: trigger plugin action only wen auth succeeded
Browse files Browse the repository at this point in the history
Change-Id: Ibd25849aa2aa50ad2e3baed0c305f13b69a392ab
  • Loading branch information
hualet committed Mar 8, 2018
1 parent a42282e commit ed5f3a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions policykitlistener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,9 @@ void PolicyKitListener::finishObtainPrivilege()
}
}

m_pluginManager.data()->reduce(m_selectedUser.toString().remove("unix-user:"),
m_dialog.data()->password());
if (m_gainedAuthorization)
m_pluginManager.data()->reduce(m_selectedUser.toString().remove("unix-user:"),
m_dialog.data()->password());

if (!m_session.isNull()) {
m_session.data()->result()->setCompleted();
Expand Down

0 comments on commit ed5f3a5

Please sign in to comment.