<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Am 24.04.2015 um 15:30 schrieb
      Christoph Kukulies:<br>
    </div>
    <blockquote cite="mid:553A4581.2090507@physik.rwth-aachen.de"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <div class="moz-signature">When I login into my newly created
        9.5.1 site with a user who belonged to no group or role<br>
        of 9.5.1 but had been created and existed formerly in 7.5.0 ,
        I'm getting the following error popping up:<br>
        <br>
        <br>
        <br>
        <small><small>401 Unauthorized </small></small>
        <h1><small><small>HTTP Status 401 -
              org.opencms.security.CmsRoleViolationException: The user
              "olduser" does not have access to the required "Element
              author" role.</small></small></h1>
        <hr noshade="noshade" size="1">
        <p><small><small><b>type</b> Status report</small></small></p>
        <p><small><small><b>message</b> <u>org.opencms.security.CmsRoleViolationException:

                The user "olduser" does not have access to the required
                "Element author" role.</u></small></small></p>
        <p><small><small><b>description</b> <u>This request requires
                HTTP authentication.</u></small></small></p>
        <hr noshade="noshade" size="1">
        <h3><small><small>Apache Tomcat/7.0.61</small></small></h3>
        <br>
      </div>
    </blockquote>
    <br>
    I have found the cause. I took a piece of code from the Alkacon Demo
    Page Bootstrap login and this<br>
    does a login into the "Offline" project.<br>
    <br>
    Changing this to "Online" made the error go away. <br>
    <br>
    <br>
    <%@page buffer="none" session="false" import="org.opencms.main.*,
    org.opencms.file.*" trimDirectiveWhitespaces="true" %><br>
    <%@ taglib prefix="cms" uri=<a class="moz-txt-link-rfc2396E" href="http://www.opencms.org/taglib/cms">"http://www.opencms.org/taglib/cms"</a>
    %><br>
    <%@ taglib prefix="c" uri=<a class="moz-txt-link-rfc2396E" href="http://java.sun.com/jsp/jstl/core">"http://java.sun.com/jsp/jstl/core"</a>
    %><br>
    <%@ taglib prefix="fmt" uri=<a class="moz-txt-link-rfc2396E" href="http://java.sun.com/jsp/jstl/fmt">"http://java.sun.com/jsp/jstl/fmt"</a>
    %><br>
    <%@ taglib prefix="fn"
    uri=<a class="moz-txt-link-rfc2396E" href="http://java.sun.com/jsp/jstl/functions">"http://java.sun.com/jsp/jstl/functions"</a> %><br>
    <br>
    <cms:secureparams /><br>
    <br>
    <fmt:setLocale value="${cms.locale}" /><br>
    <cms:bundle basename="org.my.template.loginform"><br>
    <br>
    <jsp:useBean id="login" class="org.opencms.jsp.CmsJspLoginBean"
    scope="page"><br>
            <%<br>
                    login.init (pageContext, request, response);<br>
            %><br>
            <c:set var
    ="loginou">${cms.element.settings.loginou}</c:set><br>
            <c:if test="${param.action eq 'login' && !empty
    param.name && !empty param.password}"><br>
                    <c:choose><br>
                            <c:when test ="${not empty
    cms.element.settings.loginou}"><br>
                              <% login.login
    ("/"+(String)pageContext.getAttribute ("loginou")+"/" +
    request.getParameter("name"), request.getParameter("password"),
    "Offline", request.getParameter("requestedResource")); %><br>
                            </c:when><br>
                            <c:otherwise><br>
                             <%<br>
                                String requestedResource =
    request.getParameter("requestedResource");<br>
                                if (requestedResource != null &&
    requestedResource.equals("")) requestedResource = null;<br>
                                login.login
    (request.getParameter("name"), request.getParameter("password"),
    "Offline", requestedResource);<br>
                             %> <br>
                            </c:otherwise><br>
    <br>
    <div class="moz-signature">-- <br>
      Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
    </div>
  </body>
</html>