usePermissions

Returns the current delete, insert and update permissions of the data object.

API

import { DataObject } from "@olenbetong/appframe-data";
/**
 * Returns whether the user is currently allowed to delete, insert or update
 * records in the data object.
 *
 * @param dataObject Data object to get permission status from
 * @returns Delete, insert and update permission of the data object
 */
export declare function usePermissions(dataObject: DataObject<any>): {
  allowDelete: boolean;
  allowInsert: boolean;
  allowUpdate: boolean;
};

Last updated

Was this helpful?