mirror of
https://github.com/strapi/strapi.git
synced 2025-08-30 11:45:48 +00:00
Be able to create an user from the Content Manager
This commit is contained in:
parent
a4dbc278a7
commit
110c209431
@ -24,7 +24,7 @@ class LeftMenuLink extends React.Component { // eslint-disable-line react/prefer
|
||||
className={`${styles.link} ${isLinkActive ? styles.linkActive : ''}`}
|
||||
to={{
|
||||
pathname: this.props.destination,
|
||||
search: `${this.props.source ? '?source=' : ''}${this.props.source}`,
|
||||
search: this.props.source ? `?source=${this.props.source}` : '',
|
||||
}}
|
||||
>
|
||||
<i className={`${styles.linkIcon} fa-${this.props.icon} fa`}></i>
|
||||
|
File diff suppressed because one or more lines are too long
@ -131,9 +131,15 @@ export class Edit extends React.Component {
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (this.props.editSuccess !== nextProps.editSuccess) {
|
||||
if (!isEmpty(this.props.location.search) && includes(this.props.location.search, '?redirectUrl')) {
|
||||
router.push(replace(this.props.location.search, '?redirectUrl=', ''));
|
||||
router.push({
|
||||
pathname: replace(this.props.location.search, '?redirectUrl=', ''),
|
||||
search: `?source=${this.source}`,
|
||||
});
|
||||
} else {
|
||||
router.push(replace(this.props.location.pathname, 'create', ''));
|
||||
router.push({
|
||||
pathname: replace(this.props.location.pathname, '/create', ''),
|
||||
search: `?source=${this.source}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
if (!values.provider) {
|
||||
values.password = 'local';
|
||||
values.provider = 'local';
|
||||
}
|
||||
|
||||
return strapi.query('user', 'users-permissions').create(values);
|
||||
|
Loading…
x
Reference in New Issue
Block a user