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.6 test doesn’t pass

  • advanced Capstone 3.6 test doesn’t pass

    Posted by monikagel on October 22, 2023 at 12:00 am

    Hello,

    I am having a peculiar trouble trying to pass the end of section tests. I pass everything except the second to last test, which makes little sense as the code works as expected for this, and user fiauser cannot run “tables[]”, as he gets an output of  `notAuthorised, as requested by the excercise. I am including my own code below under spoiler tag.

    quizItem success description                             error 
    ---------------------------------------------------------------------- 
    exercise3.2 Pass "check password col is updated"          "" 
    exercise3.3 Pass ".perm.users should exist on HDB process""" 
    exercise3.4 Pass "define .z.pw on HDB process"            "" 
    exercise3.4 Pass "give access to users with correct password" "" 
    exercise3.4 Pass "give access to users with wrong password" "" 
    exercise3.5 Pass "return first element of parse tree"     "" 
    exercise3.5 Pass "return ! if given update query"         "" 
    exercise3.6 Pass "define .z.pg on remote process"         "" 
    exercise3.6 Pass "fiauser can run one function"           "" 
    exercise3.6 Fail "fiauser cant run tables[]"              "" 
    exercise3.6 Pass "team members can run any function"      ""

     

    hdbH".perm.parseQuery:{(parse x)[0]}" //code for parsequery func
    hdbH".z.pg:{[query] api:.perm.users[.z.u][`api]; $[api~`all;value query;api~(.perm.parseQuery[query]);value query;`notAuthorised]}" //code for .z.pg func

     

    Could someone please suggest what might be happening here?

    monikagel replied 9 months, 3 weeks ago 2 Members · 2 Replies
  • 2 Replies
  • megan_mcp

    Administrator
    October 23, 2023 at 12:00 am

    Hi  !

    I’ve tested your code and the only issue I can see is that you need to change the spelling of the symbol from:

    `notAuthorised

    To:

    `notAuthorized

    As stated in the question (screenshot provided below).

    Let me know if this works!

    Megan

  • monikagel

    Member
    October 23, 2023 at 12:00 am

    Hi Megan,

    This did work indeed! I can’t believe I made such a silly mistake! Thank you so much for spotting that.

Log in to reply.