added fns to initalize a permission mode or resource and grant resource/mode pair to role