Hmm I don't think we expose isAdmin and isModerator globally to the templates so that you can them everywhere. Maybe we should, everything in the config object is exposed so if you open your console and type config any variable you see under that object you can use in the templates. You can also take a look at the routes by prepending api to the url like https://community.nodebb.org/api/topic/1917/users-shouldn-t-be-able-to-purge-their-posts/10 you can use stuff from there in the template as well.
I need some advice in connecting small sails.js app with nodeBB. In my sails.js application I need to get current logged user. I set sails.js session id key to express.sid (as in nodeBB), and configured it to use nodeBB collection as session storage. Then I can query for user id by session id (also from nodeBB storage). It is almost what I need to, but I can't get through some problems
nodebb and sails app have to be on same domain
when user visits sails app first, then nodeBB sets another session id and sessions are different on both apps
when user logs in nodeBB, gets new session id and also, sessions are different on both apps