github refinedev/refine @refinedev/core@4.22.0

Minor Changes

  • #4449 cc84d61bc5c Thanks @BatuhanW! - feat: allow access control provider to be configured globally.

    Now accessControlProvider accepts options.buttons parameter to globally configure UI buttons' behaviour.

    These configuration will be used as a fallback, if no configuration on button prop level is found.

    Default values:

    options.buttons.enableAccessControl => true
    options.buttons.hideIfUnauthorized => false

    const accessControlProvider: IAccessControlContext = {
        can: async (params: CanParams): Promise<CanReturnType> => {
            return { can: true };
        },
        options: {
            buttons: {
                enableAccessControl: true,
                hideIfUnauthorized: false,
            },
        },
    };

Patch Changes

  • #4521 a3c8d4f84c7 Thanks @alicanerdurmaz! - fixed: useExport's resource props is not working.
    With this fix, useExport will now work with resource props.

    useExport({
        resource: "users",
    });

Don't miss a new refine release

NewReleases is sending notifications on new releases.