@firecms/user_management 3.0.0-beta.8 → 3.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +3 -2
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/{useFirestoreUserManagement.d.ts → useBuildUserManagement.d.ts} +8 -7
- package/dist/index.es.js +1149 -865
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1635 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -9
- package/src/components/roles/RolesDetailsForm.tsx +69 -24
- package/src/components/roles/RolesTable.tsx +4 -2
- package/src/components/roles/RolesView.tsx +3 -1
- package/src/components/users/UserDetailsForm.tsx +11 -9
- package/src/components/users/UsersTable.tsx +4 -2
- package/src/hooks/index.ts +1 -1
- package/src/hooks/useBuildUserManagement.tsx +314 -0
- package/src/utils/permissions.ts +7 -6
- package/src/hooks/useFirestoreUserManagement.tsx +0 -277
package/LICENSE
CHANGED
@@ -3,12 +3,13 @@ Business Source License 1.1
|
|
3
3
|
Parameters
|
4
4
|
|
5
5
|
Licensor: Firecms S.L.
|
6
|
-
Licensed Work: Firecms CMS packages:
|
6
|
+
Licensed Work: Firecms CMS packages:
|
7
7
|
cli
|
8
8
|
collection_editor
|
9
9
|
collection_editor_firebase
|
10
10
|
data_enhancement
|
11
|
-
|
11
|
+
data_export
|
12
|
+
data_export
|
12
13
|
editor
|
13
14
|
firecms_cloud
|
14
15
|
schema_inference
|
package/dist/hooks/index.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from "./
|
1
|
+
export * from "./useBuildUserManagement";
|
2
2
|
export * from "./useUserManagement";
|
@@ -1,17 +1,16 @@
|
|
1
|
-
import { FirebaseApp } from "@firebase/app";
|
2
1
|
import { UserManagement } from "../types";
|
2
|
+
import { DataSourceDelegate } from "@firecms/core";
|
3
3
|
export interface UserManagementParams {
|
4
4
|
/**
|
5
|
-
* The
|
6
|
-
* collection indicated by `configPath`.
|
5
|
+
* The delegate in charge of persisting the data.
|
7
6
|
*/
|
8
|
-
|
7
|
+
dataSourceDelegate?: DataSourceDelegate;
|
9
8
|
/**
|
10
9
|
* Path where the plugin users configuration is stored.
|
11
10
|
* Default: __FIRECMS/config/users
|
12
11
|
* You can specify a different path if you want to store the user management configuration in a different place.
|
13
12
|
* Please keep in mind that the FireCMS users are not necessarily the same as the Firebase users (but they can be).
|
14
|
-
* The path should be relative to the root of the
|
13
|
+
* The path should be relative to the root of the database, and should always have an odd number of segments.
|
15
14
|
*/
|
16
15
|
usersPath?: string;
|
17
16
|
/**
|
@@ -39,10 +38,12 @@ export interface UserManagementParams {
|
|
39
38
|
/**
|
40
39
|
* This hook is used to build a user management object that can be used to
|
41
40
|
* manage users and roles in a Firestore backend.
|
42
|
-
* @param
|
41
|
+
* @param dataSourceDelegate
|
43
42
|
* @param usersPath
|
44
43
|
* @param rolesPath
|
45
44
|
* @param usersLimit
|
46
45
|
* @param canEditRoles
|
46
|
+
* @param allowDefaultRolesCreation
|
47
|
+
* @param includeCollectionConfigPermissions
|
47
48
|
*/
|
48
|
-
export declare function
|
49
|
+
export declare function useBuildUserManagement({ dataSourceDelegate, usersPath, rolesPath, usersLimit, canEditRoles, allowDefaultRolesCreation, includeCollectionConfigPermissions }: UserManagementParams): UserManagement;
|