code: public void addUserToRole(CmsObject cms, CmsRole role, String username) throws CmsException {
  
          m_securityManager.addUserToGroup(cms.getRequestContext(), username, role.getGroupName(), true);
      }
docs: Adds a user to the given role.<p>
  
  @param cms the opencms context
  @param role the role
  @param username the name of the user that is to be added to the role
  
  @throws CmsException if something goes wrong