Refactor get role for trust

When retrieving a role, exploit the check role function.

Change-Id: Id39740f8c531d1ea109f3ce1a1e344ac2a2fe7a1
Merge "Refactor get role for trust"