'require fs';
'require ui';
+var isReadonlyView = !L.hasViewPermission() || null;
+
return view.extend({
load: function() {
return L.resolveDefault(fs.read('/etc/crontabs/root'), '');
E('p', { 'class': 'cbi-section-descr' },
_('This is the system crontab in which scheduled tasks can be defined.') +
_('<br/>Note: you need to manually restart the cron service if the crontab file was empty before editing.')),
- E('p', {}, E('textarea', { 'style': 'width:100%', 'rows': 10 }, [ crontab != null ? crontab : '' ]))
+ E('p', {}, E('textarea', { 'style': 'width:100%', 'rows': 10, 'disabled': isReadonlyView }, [ crontab != null ? crontab : '' ]))
]);
},