adminforth 1.1.16 → 1.1.17
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/package.json
CHANGED
|
@@ -5,10 +5,11 @@ import { AllowedActionsEnum, AdminUser } from '../../types/AdminForthConfig.js';
|
|
|
5
5
|
export type PluginOptions = {
|
|
6
6
|
/**
|
|
7
7
|
* Called to check if user has access to a page
|
|
8
|
+
* Should return `true` if user has access. If user has no access, return `false` or a string with an error message
|
|
8
9
|
* @param user - The user object
|
|
9
10
|
* @param page - The page to check access for
|
|
10
11
|
* @param meta - The meta object containing query for list/show or record for save/edit
|
|
11
|
-
* @returns
|
|
12
|
+
* @returns {boolean | string} -
|
|
12
13
|
*/
|
|
13
14
|
hasAccess: (user: AdminUser, page: AllowedActionsEnum, meta: any) => Promise<boolean | string>;
|
|
14
15
|
}
|