Hey guys. The title provides the gist of it. Is there a reasonably straightforward way of making Meteor’s dynamic-imports dependant on authentication so that certain client-side modules would only be served to logged in users, or even more narrowly, only to users that have certain roles (i.e. tokens in their user document) assigned to them? The documentation on the dynamic-import package does not make any mention of this and I am assuming that there is no easy way of achieving this. It seems that whenever a client asks for a dynamic module, the server will just send it to the client no questions asked. Is this correct or am I missing something?
I am asking since I would like to make certain parts of my app accessible only to users that have administrator rights. I am of course already restricting access to relevant data, but in certain cases the view layer templates themselves already provide some insight into what is or is not monitored by the admins and ideally I would like to avoid that.
Thanks for any help.