2015-02-13 07:22:32 +03:00
|
|
|
import Ember from 'ember';
|
2014-06-23 20:01:43 +04:00
|
|
|
var SettingsController = Ember.Controller.extend({
|
2015-01-04 22:45:30 +03:00
|
|
|
needs: ['feature'],
|
|
|
|
|
2014-11-28 14:09:45 +03:00
|
|
|
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;
|
|
|
|
}),
|
2014-12-31 15:57:00 +03:00
|
|
|
showTags: Ember.computed('session.user.name', function () {
|
|
|
|
return this.get('session.user.isAuthor') ? false : true;
|
2014-11-28 14:09:45 +03:00
|
|
|
}),
|
2015-02-25 18:15:55 +03:00
|
|
|
showNavigation: Ember.computed('session.user.name', function () {
|
|
|
|
return this.get('session.user.isAuthor') || this.get('session.user.isEditor') ? false : true;
|
2015-01-11 22:55:52 +03:00
|
|
|
}),
|
2015-01-04 22:45:30 +03:00
|
|
|
showCodeInjection: Ember.computed('session.user.name', 'controllers.feature.codeInjectionUI', function () {
|
|
|
|
return this.get('session.user.isAuthor') || this.get('session.user.isEditor') || !this.get('controllers.feature.codeInjectionUI') ? false : true;
|
2014-11-28 14:09:45 +03:00
|
|
|
}),
|
|
|
|
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;
|
|
|
|
})
|
2014-06-23 20:01:43 +04:00
|
|
|
});
|
|
|
|
|
|
|
|
export default SettingsController;
|