Uploaded image for project: 'Click'
  1. Click
  2. CLK-724

Menu#isUserInRoles should check if user has access to menus without roles

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.3.0-M1
    • core
    • None

    Description

      Menu#isUserInRole currently assumes that if a menu has no roles defined, the user cannot access to it.

      I think it would be better to invoke the AcessController#hasAccess with a null or empty ("") role, allowing the AccessController implementation to decide whether or not the user has access.

      While the Servlet spec isn't explicit on this, in Tomcat, request.isUserInRole returns true if null is passed in. In other words, in Tomcat, the user has access to the "null" role.

      Attachments

        Activity

          People

            sabob Bob Schellink
            sabob Bob Schellink
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: