Fix wrong deprecated mark

This commit is contained in:
sianida26 2024-03-01 17:23:04 +07:00
parent d0a4ff691e
commit 8f7b9e1788
3 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,6 @@ import { PermissionCode } from "@/modules/permission/data/initialPermissions";
* Deprecated. Use dashboard service instead
* Checks if the current user has the specified permissions.
*
* @deprecated
* @param permission - The specific permission to check. If it's "guest-only", the function returns true if the user is not authenticated. If it's "authenticated-only", it returns true if the user is authenticated. For other permissions, it checks against the user's roles and direct permissions.
* @param currentUser - Optional. The current user object. If not provided, the function retrieves the current user.
* @returns true if the user has the required permission, otherwise false.

View File

@ -6,7 +6,7 @@ import getCurrentUser from "@/modules/auth/utils/getCurrentUser";
* Checks multiple permissions for the current user and returns an object indicating
* whether each permission is granted.
*
* Deprecated. Moved into Auth module
* Deprecated. Use `checkMultiplePermission()` from auth module instead.
*
* @deprecated
* @param permissions - An object with keys as permission names and values as the required roles/permissions.

View File

@ -4,6 +4,9 @@ import "server-only";
/**
* Checks if the current user has the specified permissions.
*
* Deprecated. Use `checkPermission()` from auth module instead.
*
* @deprecated
* @param permission - The specific permission to check. If it's "guest-only", the function returns true if the user is not authenticated. If it's "authenticated-only", it returns true if the user is authenticated. For other permissions, it checks against the user's roles and direct permissions.
* @param currentUser - Optional. The current user object. If not provided, the function retrieves the current user.
* @returns true if the user has the required permission, otherwise false.