Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] Backport <DatagridAG> and <DatagridAGClient> access control's doc #10521

Merged
merged 1 commit into from
Feb 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/DatagridAG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1341,6 +1341,12 @@ When using `DatagridAG` with dates, [the `ag-grid` documentation](https://www.ag
> The default Value Parser and Value Formatter use the ISO string format 'yyyy-mm-dd'.
> If you wish to use a different date format, then you can [Override the Pre-Defined Cell Data Type Definition](https://www.ag-grid.com/react-data-grid/cell-data-types/#overriding-the-pre-defined-cell-data-type-definitions).

### Access Control

`<DatagridAG>` has built-in [access control](./Permissions.md#access-control). If the `authProvider` implements the `canAccess` method, users will only be allowed to edit rows of, say, resource `'cars'` if `canAccess({ action: 'edit', resource: 'cars' })` returns `true`.

**Note:** the access control check can only be done at the resource level and not at the record level.

### Enabling Full Row Edition

By default, editing is enabled on cells, which means you can edit a cell by double-clicking on it, and it will trigger a call to the dataProvider's `update` function.
Expand Down Expand Up @@ -2843,6 +2849,12 @@ const CarList = () => {
```
{% endraw %}

### Access Control

`<DatagridAG>` has built-in [access control](./Permissions.me#access-control). If the `authProvider` implements the `canAccess` method, users will only be allowed to edit rows of, say, resource `'cars'` if `canAccess({ action: 'edit', resource: 'cars' })` returns `true`.

**Note:** the access control check can only be done at the resource level and not at the record level.

### Enabling Full Row Edition

By default, editing is enabled on cells, which means you can edit a cell by double-clicking on it, and it will trigger a call to the dataProvider's `update` function.
Expand Down
Loading