Ghost/core/client/app/routes/team/index.js
cobbspur ba80e6ebaa Change permissions for team area
closes #5434

- remove transition away from team page to user page of authors
- hide invite button from authors
- hide invited users from authors
- adjusted gh-user-can and renamed to gh-user-can-admin
- hide password reset on owners profile from administrators
- hide input field for owner email from administrators pending api fix
- fix up tests
2015-07-03 20:06:45 +01:00

44 lines
1.1 KiB
JavaScript

import AuthenticatedRoute from 'ghost/routes/authenticated';
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
import PaginationRouteMixin from 'ghost/mixins/pagination-route';
import styleBody from 'ghost/mixins/style-body';
var paginationSettings;
paginationSettings = {
page: 1,
limit: 20,
status: 'active'
};
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, PaginationRouteMixin, {
titleToken: 'Team',
classNames: ['view-team'],
setupController: function (controller, model) {
this._super(controller, model);
this.setupPagination(paginationSettings);
},
beforeModel: function (transition) {
this._super(transition);
},
model: function () {
var self = this;
return self.store.find('user', {limit: 'all', status: 'invited'}).then(function () {
return self.store.filter('user', paginationSettings, function () {
return true;
});
});
},
actions: {
reload: function () {
this.refresh();
}
}
});