Writing mistake
There are two mistakes on the third line of the second code given under this section https://rubenwardy.com/minetest_modding_book/en/chapters/sfinv.html#conditionally-showing-to-players
You wrote "mientest" instead of "minetest" and "grantee" instead of "granter"