KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums KX Academy Advanced Capstone 3.2 and 3.6 tests failing Re: Advanced Capstone 3.2 and 3.6 tests failing

  • tanaymathur

    Member
    December 4, 2023 at 12:00 am

    Hi Megan,

    Please find the code below.

    Best Regards,

    Tanay

    //3.2
    .perm.users:("S*S";enlist " ") 0: `$"../AdvancedCapstone.Data/users.txt"
    .perm.users:1!(update password:{.Q.sha1 x}each password from .perm.users)
    hdbH(set;`.perm.parseQuery;.perm.parseQuery)
    
    // 3.6
    hdbH".z.pg:{permission:.perm.users[.z.u;`api];test:.perm.parseQuery[x];$[permission~`all;value x;($[test~permission;value x;:`notAuthorized])]}"