mirror of
https://github.com/strapi/strapi.git
synced 2025-08-09 01:07:27 +00:00
commit
db4f0cf8b7
@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useReducer } from 'react';
|
||||
import axios from 'axios';
|
||||
import { camelCase, get, omit, upperFirst } from 'lodash';
|
||||
import { camelCase, get, omit, upperFirst, pick } from 'lodash';
|
||||
import { Redirect, useRouteMatch, useHistory } from 'react-router-dom';
|
||||
import { auth, useQuery } from 'strapi-helper-plugin';
|
||||
import { Padded } from '@buffetjs/core';
|
||||
@ -207,12 +207,7 @@ const AuthPage = ({ hasAdmin }) => {
|
||||
axios({
|
||||
method: 'POST',
|
||||
url: 'https://analytics.strapi.io/register',
|
||||
data: omit(modifiedData, [
|
||||
'userInfo.password',
|
||||
'userInfo.confirmPassword',
|
||||
'password',
|
||||
'confirmPassword',
|
||||
]),
|
||||
data: pick(modifiedData, ['userInfo.email', 'userInfo.firstname']),
|
||||
});
|
||||
}
|
||||
// Redirect to the homePage
|
||||
|
@ -20,7 +20,7 @@ const findMatchingPermissions = (userPermissions, permissions) => {
|
||||
const formatPermissionsForRequest = permissions =>
|
||||
permissions.map(permission =>
|
||||
pickBy(permission, (value, key) => {
|
||||
return ['action', 'subject', 'fields'].includes(key) && !isEmpty(value);
|
||||
return ['action', 'subject'].includes(key) && !isEmpty(value);
|
||||
})
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user