So we can break your question down into 3 questsion:
1 . How can I trigger some code when a user opens a Maya rig?
2. How can I check if a user has permission to use that file?
3. How can I prevent them from using the rig if they don't have permission?
Question 1:
You could use a scriptNode: https://download.autodesk.com/us/maya/2011help/CommandsPython/scriptNode.html
A script node can be triggered when the file is open, and that script node will run some code.
However it's very easy to prevent a script node from running, since they can be disabled in Maya>Options
You could create a plugin using the Maya API, and set it up so that plugin creates a callback when it is loaded.
But again, the user can just prevent the plugin from loading, by default Maya will ask for their permission before loading it.
So, forcing Maya to run some code when a user opens a file is possible, but it's not going to give you any kind of security.
Question 2:
In this other forum post a user reccomends LimeLM as a way to impliment license/user verification
https://forums.autodesk.com/t5/maya-programming/license-mechanism-and-mfnplugin/m-p/9886343
I've never used it, but it seems like a good place to start.
Question 3:
You could have the scriptnode delete stuff out of the rig to make it unusable, but if the scriptnode is disabled it won't matter.
Basically, what you are trying to do is only possible if there is a custom node in your rig that is 100% required for it to function, because you can use LimeLM to prevent a user without a license from loading your plugin, and therefore the custom node would be missing and the rig wouldn't work.
If you're just trying to put a password of sorts on a Maya scene that uses Vanilla nodes, there isn't a way to do that.