diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-12-01 10:36:13 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-27 12:29:25 +0100 |
commit | 7d0102bf7302a483209e0d1c926260713f0e56c6 (patch) | |
tree | a6286d8dcb2748f062fa00d21a92a6e58e46b917 /core/js | |
parent | d0a6368a8bc9b03cba66c4a485aa001da187b2e3 (diff) | |
download | nextcloud-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.js | 19 |
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) |