what permission is needed to access those apis?
- 10 years ago
Hi kavencai,
no worries, I'm very new to Lith too...learning every day...
A page that helped me a lot is http://community.lithium.com/t5/Developers-Knowledge-Base/FreeMarker-context-objects-and-directives/ta-p/9217
basically restadmin() is the same as rest() to make custom REST API calls from FreeMarker templates with the difference that it acts like if you were an Administrator, e.g. it will return hidden forum boards (for normal users) etc., so be very careful where and when to use it! I just had one call that would completely bring down the whole site with error 500 for anonymous/not logged in users if I didn't use restadmin(), all other calls (and there are many) work with the normal rest() context object but not
/users/id/<user_id>/roles
so when I saw all your calls with /users/id/... this jumped to my mind immediately =)