code: public void setBeforeLoginMessage(CmsObject cms, CmsLoginMessage message) throws CmsRoleViolationException {
  
          if (OpenCms.getRunLevel() >= OpenCms.RUNLEVEL_3_SHELL_ACCESS) {
              // during configuration phase no permission check id required
              OpenCms.getRoleManager().checkRole(cms, CmsRole.ROOT_ADMIN);
          }
          m_beforeLoginMessage = message;
  
          if (m_beforeLoginMessage != null) {
              m_beforeLoginMessage.setFrozen();
          }
      }
docs: Sets the before login message to display on the login form.<p>
  
  This operation requires that the current user has role permissions of <code>{@link CmsRole#ROOT_ADMIN}</code>.<p>
  
  @param cms the current OpenCms user context
  @param message the message to set
  
  @throws CmsRoleViolationException in case the current user does not have the required role permissions