aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2014-02-20 10:26:05 +0100
committerLukas Reschke <lukas@statuscode.ch>2014-02-20 10:26:05 +0100
commitb61f0f11c5aa03240d3c18f02a1c790bd43522c0 (patch)
tree5a1fcb325a3ec6a029f1bac7cbdd1e9bac2ba387 /core
parent16262e3fd2c00475cc3b43a2684a45cc8ae70829 (diff)
downloadnextcloud-server-b61f0f11c5aa03240d3c18f02a1c790bd43522c0.tar.gz
nextcloud-server-b61f0f11c5aa03240d3c18f02a1c790bd43522c0.zip
Move oc_isadmin to the config JS script
Diffstat (limited to 'core')
-rw-r--r--core/js/config.php1
-rw-r--r--core/js/js.js1
-rw-r--r--core/templates/layout.user.php2
3 files changed, 2 insertions, 2 deletions
diff --git a/core/js/config.php b/core/js/config.php
index b6875fb73f9..6185be523e7 100644
--- a/core/js/config.php
+++ b/core/js/config.php
@@ -24,6 +24,7 @@ foreach(OC_App::getEnabledApps() as $app) {
$array = array(
"oc_debug" => (defined('DEBUG') && DEBUG) ? 'true' : 'false',
+ "ox_isadmin" => p(OC_User::isAdminUser(OC_User::getUser()) ? 'true' : 'false');
"oc_webroot" => "\"".OC::$WEBROOT."\"",
"oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution
"datepickerFormatDate" => json_encode($l->l('jsdate', 'jsdate')),
diff --git a/core/js/js.js b/core/js/js.js
index 3b3e0e99455..d4d2583f1e5 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -10,7 +10,6 @@ var oc_webroot;
var oc_current_user = document.getElementsByTagName('head')[0].getAttribute('data-user');
var oc_requesttoken = document.getElementsByTagName('head')[0].getAttribute('data-requesttoken');
-var oc_isadmin = document.getElementsByTagName('head')[0].getAttribute('data-isAdmin');
window.oc_config = window.oc_config || {};
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index d46f97852cc..bc1c700402e 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -6,7 +6,7 @@
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
<!--[if !IE]><!--><html class="ng-csp"><!--<![endif]-->
- <head data-isAdmin="<?php p(OC_User::isAdminUser(OC_User::getUser()) ? 'true' : 'false'); ?>" data-user="<?php p($_['user_uid']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>">
+ <head data-user="<?php p($_['user_uid']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>">
<title>
<?php
p(!empty($_['application'])?$_['application'].' - ':'');