Move oc_isadmin to the config JS script

This commit is contained in:
Lukas Reschke 2014-02-20 10:26:05 +01:00
parent 16262e3fd2
commit b61f0f11c5
3 changed files with 2 additions and 2 deletions

View File

@ -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')),

View File

@ -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 || {};

View File

@ -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'].' - ':'');