summaryrefslogtreecommitdiff
path: root/src/polkitbackend/init.js
diff options
context:
space:
mode:
authorDavid Zeuthen <zeuthen@gmail.com>2012-07-06 10:19:45 -0400
committerDavid Zeuthen <zeuthen@gmail.com>2012-07-06 10:19:45 -0400
commit50dcb370edc365114fa6640770ebc253d39570ab (patch)
treea200e0baae0cb81dff23b91ea8307b61aafd3a9a /src/polkitbackend/init.js
parentd45564a8b3b90c9dd990746ed082f4302fc017c1 (diff)
downloadpolkit-50dcb370edc365114fa6640770ebc253d39570ab.tar.gz
Introduce a polkit.Result enumeration for authorization rules
This way an authorization rule can do this return polkit.Result.YES; which is slightly nicer than return "yes"; https://bugs.freedesktop.org/show_bug.cgi?id=50983 Signed-off-by: David Zeuthen <zeuthen@gmail.com>
Diffstat (limited to 'src/polkitbackend/init.js')
-rw-r--r--src/polkitbackend/init.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/polkitbackend/init.js b/src/polkitbackend/init.js
index 16862d4..af85d05 100644
--- a/src/polkitbackend/init.js
+++ b/src/polkitbackend/init.js
@@ -81,3 +81,13 @@ polkit._deleteRules = function() {
this._adminRuleFuncs = [];
this._ruleFuncs = [];
};
+
+polkit.Result = {
+ NO : "no",
+ YES : "yes",
+ AUTH_SELF : "auth_self",
+ AUTH_SELF_KEEP : "auth_self_keep",
+ AUTH_ADMIN : "auth_admin",
+ AUTH_ADMIN_KEEP : "auth_admin_keep",
+ NOT_HANDLED : null
+};