handle different types of permissions