Hide template and fileupload buttons for anonymous users
This commit is contained in:
@@ -98,6 +98,7 @@ define([
|
|||||||
break;
|
break;
|
||||||
case 'template':
|
case 'template':
|
||||||
if (!AppConfig.enableTemplates) { return; }
|
if (!AppConfig.enableTemplates) { return; }
|
||||||
|
if (!common.isLoggedIn()) { return; }
|
||||||
button = $('<button>', {
|
button = $('<button>', {
|
||||||
title: Messages.saveTemplateButton,
|
title: Messages.saveTemplateButton,
|
||||||
}).append($('<span>', {'class':'fa fa-bookmark', style: 'font:'+size+' FontAwesome'}));
|
}).append($('<span>', {'class':'fa fa-bookmark', style: 'font:'+size+' FontAwesome'}));
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ define([
|
|||||||
});
|
});
|
||||||
|
|
||||||
//If file, display the upload button
|
//If file, display the upload button
|
||||||
if (types.indexOf('file') !== -1) {
|
if (types.indexOf('file') !== -1 && common.isLoggedIn()) {
|
||||||
$filter.append(common.createButton('upload', false, data));
|
$filter.append(common.createButton('upload', false, data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user