
export function permission(value, parent) {
    let permission = window.localStorage.getItem('permission')
    permission = permission.split(',')
    // if(parent) {
    //     if(permission.includes(value) && permission.includes(parent)) {
    //         return true
    //     } else {
    //         return false
    //     }
    // } else {
    //     if(permission.includes(value)) {
    //         return true
    //     } else {
    //         return false
    //     }
    // }

    if(permission.includes(value)) {
        return true
    } else if(permission.includes(value) && permission.includes(parent)) {
        return true
    } else {
        return false
    }
    
}