How to create and monitor permission codes.