@firecms/user_management 3.0.0-canary.114 → 3.0.0-canary.116

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.
@@ -168,11 +168,9 @@ export function RolesDetailsForm({
168
168
  </div>
169
169
 
170
170
  <div className={"col-span-12"}>
171
- <Paper
172
-
173
- className="bg-inherit">
174
- <Table>
175
- <TableHeader>
171
+ <Paper className="bg-inherit overflow-hidden">
172
+ <Table className={"w-full rounded-md"}>
173
+ <TableHeader className={"rounded-md"}>
176
174
  <TableCell></TableCell>
177
175
  <TableCell
178
176
  align="center">Create
@@ -190,6 +188,9 @@ export function RolesDetailsForm({
190
188
  align="center">Delete
191
189
  entities
192
190
  </TableCell>
191
+ <TableCell
192
+ align="center">
193
+ </TableCell>
193
194
  </TableHeader>
194
195
 
195
196
  <TableBody>
@@ -245,6 +246,9 @@ export function RolesDetailsForm({
245
246
 
246
247
  </Tooltip>
247
248
  </TableCell>
249
+ <TableCell
250
+ align="center">
251
+ </TableCell>
248
252
  </TableRow>
249
253
  {collections && collections.map((col) => (
250
254
  <TableRow key={col.name}>
@@ -280,6 +284,26 @@ export function RolesDetailsForm({
280
284
  checked={(isAdmin || defaultDelete || getIn(values, `collectionPermissions.${col.path}.delete`)) ?? false}
281
285
  onCheckedChange={(checked) => setFieldValue(`collectionPermissions.${col.path}.delete`, checked)}/>
282
286
  </TableCell>
287
+
288
+ <TableCell
289
+ align="center">
290
+ <Tooltip
291
+ title="Allow all permissions in this collections">
292
+ <Button
293
+ className={"color-inherit"}
294
+ onClick={() => {
295
+ setFieldValue(`collectionPermissions.${col.path}.create`, true);
296
+ setFieldValue(`collectionPermissions.${col.path}.read`, true);
297
+ setFieldValue(`collectionPermissions.${col.path}.edit`, true);
298
+ setFieldValue(`collectionPermissions.${col.path}.delete`, true);
299
+ }}
300
+ disabled={isAdmin || !editable}
301
+ variant={"text"}>
302
+ All
303
+ </Button>
304
+
305
+ </Tooltip>
306
+ </TableCell>
283
307
  </TableRow>
284
308
  ))}
285
309
  </TableBody>
@@ -203,7 +203,7 @@ export function useBuildUserManagement({
203
203
  console.debug("Deleting", role);
204
204
  const { id } = role;
205
205
  const entity: Entity<any> = {
206
- path: usersPath,
206
+ path: rolesPath,
207
207
  id: id,
208
208
  values: {}
209
209
  };