chore: init bj_power monorepo (dashboard/mes/wms/wms_client/workstation), clear subproject git metadata and align naming to folder names
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
const hasPermission = (
|
||||
userInfo: UserInfosState,
|
||||
permission: string | undefined
|
||||
) => {
|
||||
if (!permission) {
|
||||
return true
|
||||
}
|
||||
if (userInfo && userInfo.permissions) {
|
||||
return userInfo.permissions.includes(permission)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
export { hasPermission }
|
||||
Reference in New Issue
Block a user