Hello,
If you want use code, then you have to pass through the Coupon system, and in order to answer you have a look on my screenshot :
You can see, that by using
ACL you can define to give access to a
specific user group, maybe you have to create a new user group to fit your needs (user can belong to several group).
In
Discount Features part, you can have the choice to let the user provide the code
or auto load the coupon (when the user match with your settings).
Hope this will fit your needs.
Regards