import React from "react"; import { Fragment } from "react"; import { memo } from "react"; import { useRouter } from "@webiny/app"; import { AdminConfig } from "~/config/AdminConfig.js"; import { AdminLayout } from "~/components/AdminLayout.js"; import { RegisterFeature } from "~/components/RegisterFeature.js"; import { HasPermission } from "~/presentation/security/components/HasPermission.js"; import { AdminUsersPermissionsFeature } from "~/features/adminUsers/permissions/feature.js"; import { GetCurrentUserFeature } from "~/features/adminUsers/account/getCurrentUser/index.js"; import { UpdateCurrentUserFeature } from "~/features/adminUsers/account/updateCurrentUser/index.js"; import { ListUsersFeature } from "~/features/adminUsers/users/listUsers/index.js"; import { GetUserFeature } from "~/features/adminUsers/users/getUser/index.js"; import { CreateUserFeature } from "~/features/adminUsers/users/createUser/index.js"; import { UpdateUserFeature } from "~/features/adminUsers/users/updateUser/index.js"; import { DeleteUserFeature } from "~/features/adminUsers/users/deleteUser/index.js"; import { UserEventsFeature } from "~/features/adminUsers/users/userEvents/index.js"; import { UsersView } from "./views/Users/UsersView.js"; import { UserAccountForm } from "./views/Account/index.js"; import { SecurityPermission } from "./SecurityPermission.js"; import { AccountDetails } from "./userMenu/AccountDetails.js"; import { Routes } from "./routes.js"; const { Route, Menu } = AdminConfig; /** * The Users screen, the Account screen, and the "Admin Users" permission, for identity providers * whose users are created and edited in Webiny. Rendered by such a provider's admin extension, which * also has to serve the `adminUsers` create, update and delete mutations behind these screens. The * password rules come from the build, see `readPasswordPolicyRules`. */ const AdminUsersComponent = () => { const { getLink } = useRouter(); return ( } /> } /> {/* Not behind `adminUsers.user`: every user can change their own details, and the menu item below links here for everyone. */} } /> } /> ); }; export const AdminUsers = memo(AdminUsersComponent);