Add isGranted method to ResourceController.
Adding support to complex name.