diff --git a/app.js b/app.js index 64039a41..426e15b1 100644 --- a/app.js +++ b/app.js @@ -329,6 +329,7 @@ if (app.get('env') === 'development') { return next(); } + console.log(err); if (req.needsJSONResponse) { const resp = { message: err.message, diff --git a/client/src/shares/Share.js b/client/src/shares/Share.js index d1b491a8..2fbb9362 100644 --- a/client/src/shares/Share.js +++ b/client/src/shares/Share.js @@ -110,19 +110,18 @@ export default class Share extends Component { render() { const t = this.props.t; - const roles = mailtrainConfig.roles[this.props.entityTypeId]; const actions = data => [ { label: 'Delete', - action: () => this.deleteShare(data[4]) + action: () => this.deleteShare(data[3]) } ]; const sharesColumns = [ - { data: 1, title: t('Username') }, - { data: 2, title: t('Name') }, - { data: 3, title: t('Role'), render: data => roles[data] ? roles[data].name : data } + { data: 0, title: t('Username') }, + { data: 1, title: t('Name') }, + { data: 2, title: t('Role') } ]; @@ -144,13 +143,6 @@ export default class Share extends Component { ]; - const rolesData = []; - for (const key in roles) { - const role = roles[key]; - rolesData.push([ key, role.name, role.description ]); - } - - if (this.state.entity) { return (
@@ -158,8 +150,8 @@ export default class Share extends Component {

{t('Add User')}

- this.usersTableSelect = node} id="userId" label={t('User')} withHeader dropdown dataUrl={`/rest/shares-users-table/${this.props.entityTypeId}/${this.state.entityId}`} columns={usersColumns} selectionLabelIndex={usersLabelIndex}/> - + this.usersTableSelect = node} id="userId" label={t('User')} withHeader dropdown dataUrl={`/rest/shares-unassigned-users-table/${this.props.entityTypeId}/${this.state.entityId}`} columns={usersColumns} selectionLabelIndex={usersLabelIndex}/> +