From 7d0102bf7302a483209e0d1c926260713f0e56c6 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Fri, 1 Dec 2017 10:36:13 +0100 Subject: expose capabilities in js Signed-off-by: Bjoern Schiessle --- core/js/js.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'core/js') diff --git a/core/js/js.js b/core/js/js.js index 9b8829de250..cefe1d92a0f 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -80,6 +80,13 @@ var OCP = {}, */ webroot:oc_webroot, + /** + * Capabilities + * + * @type array + */ + _capabilities: window.oc_capabilities || null, + appswebroots:(typeof oc_appswebroots !== 'undefined') ? oc_appswebroots:false, /** * Currently logged in user or null if none @@ -308,6 +315,18 @@ var OCP = {}, return OC.webroot; }, + + /** + * Returns the capabilities + * + * @return {array} capabilities + * + * @since 13.0 + */ + getCapabilities: function() { + return OC._capabilities; + }, + /** * Returns the currently logged in user or null if there is no logged in * user (public page mode) -- cgit v1.2.3