Add isGranted method to ResourceController.