payload-gatekeeper
Version:
The ultimate access control gatekeeper for Payload CMS v3 - Advanced RBAC with wildcard support, auto role assignment, and flexible configuration
16 lines • 683 B
TypeScript
/**
* UI Visibility check utilities
* Collections should only be visible in the admin UI if the user has 'manage' permission
*/
/**
* Create a hidden function for collections that checks for manage permission
* @param collectionSlug - The slug of the collection
* @returns A function that can be used in collection.admin.hidden
*/
export declare function createUIVisibilityCheck(collectionSlug: string): ({ user }: any) => boolean;
/**
* Check if user has permission to see a collection in the UI
* This is a helper for custom implementations
*/
export declare function canSeeInUI(user: any, collectionSlug: string): boolean;
//# sourceMappingURL=checkUIVisibility.d.ts.map