I can't imagine why you would want to do this, as the HMI restrictions should prevent access to things in the PLC anyway, BUT you can try this...
1) Create a bunch of tags, that write to the PLC. (Has_Code_A, Has_Code_B, etc)
2) Create a Login Macro, and assign the tags in the Login Macro...
MACRO_LOGIN
1-- Tag: Has_Code_A Value (Expression): CurrentUserHasCode( A )
2-- Tag: Has_Code_B Value (Expression): CurrentUserHasCode( B )
etc.