To check access rights in the code, use the AccessRight method.
If IsInRole("AddClient") Then ...
If AccessRight("Add", Metadata.Catalogs.Client) Then ...
This approach allows you to increase the code robustness when configuration roles are revised.