mirror of https://github.com/rancher/ui.git
20 lines
584 B
JavaScript
20 lines
584 B
JavaScript
import Ember from 'ember';
|
|
import C from 'ui/utils/constants';
|
|
|
|
export default Ember.Component.extend({
|
|
prefs: Ember.inject.service(),
|
|
classNames: ['articles'],
|
|
|
|
actions: {
|
|
hideAccessWarning: function() {
|
|
this.set('prefs.'+C.PREFS.ACCESS_WARNING, false);
|
|
}
|
|
},
|
|
|
|
showAccessWarning: function() {
|
|
return this.get('app.showArticles') !== false &&
|
|
!this.get('app.authenticationEnabled') &&
|
|
this.get('prefs.'+C.PREFS.ACCESS_WARNING) !== false;
|
|
}.property('app.showArticles','app.authenticationEnabled','prefs.'+C.PREFS.ACCESS_WARNING)
|
|
});
|