Skip to content

Commit

Permalink
Action identifier for administrative privileges
Browse files Browse the repository at this point in the history
Add a method that returns the PolicyKit action identifier for modules
that requires administrative privileges.

Issue: #11
  • Loading branch information
plfiorini committed Feb 3, 2013
1 parent bd64262 commit 604a6ca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/preferencesmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ namespace Hawaii
{
return false;
}

QString PreferencesModule::administrativeActionId() const
{
return QStringLiteral("");
}
}
}

Expand Down
9 changes: 9 additions & 0 deletions src/lib/preferencesmodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,15 @@ namespace Hawaii
* This method returns false by default.
*/
virtual bool requiresAdministrativePrivileges() const;

/**
* @returns the identifier for the action that requires
* administrative privileges.
*
* If this module doesn't require administrative privileges, this
* methods returns an empty string.
*/
virtual QString administrativeActionId() const;
};
}
}
Expand Down

0 comments on commit 604a6ca

Please sign in to comment.