mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 00:11:49 +03:00
a7845cfd70
refs #1993 - adds ctrl/cmd+s for save - adds config flag - adds icon on settings page, puts items in the right order - sorts out permissions for all settings pages with consistent configuration
26 lines
1.1 KiB
JavaScript
26 lines
1.1 KiB
JavaScript
var SettingsController = Ember.Controller.extend({
|
|
showGeneral: Ember.computed('session.user.name', function () {
|
|
return this.get('session.user.isAuthor') || this.get('session.user.isEditor') ? false : true;
|
|
}),
|
|
showUsers: Ember.computed('session.user.name', function () {
|
|
return this.get('session.user.isAuthor') ? false : true;
|
|
}),
|
|
showTags: Ember.computed('session.user.name', 'config.tagsUI', function () {
|
|
return this.get('session.user.isAuthor') || !this.get('config.tagsUI') ? false : true;
|
|
}),
|
|
|
|
showCodeInjection: Ember.computed('session.user.name', 'config.codeInjectionUI', function () {
|
|
return this.get('session.user.isAuthor') || this.get('session.user.isEditor') || !this.get('config.codeInjectionUI') ? false : true;
|
|
}),
|
|
|
|
showLabs: Ember.computed('session.user.name', function () {
|
|
return this.get('session.user.isAuthor') || this.get('session.user.isEditor') ? false : true;
|
|
}),
|
|
|
|
showAbout: Ember.computed('session.user.name', function () {
|
|
return this.get('session.user.isAuthor') ? false : true;
|
|
})
|
|
});
|
|
|
|
export default SettingsController;
|