advanced Capstone 3.6 test doesn't pass

https://learninghub.kx.com/forums/topic/advanced-capstone-3-6-test-doesnt-pass

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?

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

Hi Megan,

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

Piggybacking off this topic, I made a similar error and got a similar result, however in my case, fixing the function didn't work.

I can verify that running fiaHandle"tables[]" returns `notAuthorized, but the test is still failing.