users.js 398 B

1234567891011121314151617
  1. import MisagoRoute from 'misago/routes/misago';
  2. export default MisagoRoute.extend({
  3. beforeModel: function() {
  4. if (!this.auth.get('user.acl.can_browse_users_list')) {
  5. this.throw403(gettext("You can't browse users list."));
  6. }
  7. },
  8. model: function() {
  9. return this.store.find('rank');
  10. },
  11. unloadUsers: function() {
  12. this.store.unloadAll('user');
  13. }.on('deactivate')
  14. });