summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-12-01 10:36:13 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-02-27 12:29:25 +0100
commit7d0102bf7302a483209e0d1c926260713f0e56c6 (patch)
treea6286d8dcb2748f062fa00d21a92a6e58e46b917 /core/js
parentd0a6368a8bc9b03cba66c4a485aa001da187b2e3 (diff)
downloadnextcloud-server-7d0102bf7302a483209e0d1c926260713f0e56c6.tar.gz
nextcloud-server-7d0102bf7302a483209e0d1c926260713f0e56c6.zip
expose capabilities in js
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'core/js')
-rw-r--r--core/js/js.js19
1 files changed, 19 insertions, 0 deletions
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)