I am create a web application and I would like to add a print widget to give them access to print the map or sections of the map. However, I would like it to be password protected so I, as admin can give only certain persons the privilege to do so. Is this possible and how do I go about doing so?
I don't think you can control that level of privileges' inside the Javascript framework.
Depending on what your end goal is - you could simply implement something on the frontend to control whether or not that print widget UI displays whether or not they belong to a group inside ArcGIS or similar.
The printing functionality isn't technically protected, but unless you expect your users to purposefully circumvent your UI it should be enough in most cases.