Role security identity fix

The role security identity was only working when using the origin Role class. The construct method is changed to enable support for custom role entities.