add support for external permission handler