public Result execute(Session session) throws StatementException {
GlobalAuthorizationConfiguration gac = session.getCacheManager().getCacheManagerConfiguration().security().authorization();
if (!gac.enabled()) {
throw log.authorizationNotEnabledOnContainer();
}
if (!(gac.principalRoleMapper() instanceof ClusterRoleMapper)) {
throw log.noClusterPrincipalMapper("GRANT");
}
ClusterRoleMapper cpm = (ClusterRoleMapper) gac.principalRoleMapper();
cpm.grant(roleName, principalName);
return EmptyResult.RESULT;