Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-1488

Create enumerated class for the access levels

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Major
    • None
    • 1.0
    • Security
    • None
    • patch
    • Low
    • N/A
    • N/A
    • Awaiting Contributor feedback

    Description

      In the current version access levels ("edit", "admin", "programming", etc) are strings retrieved with XWikiRightServiceImpl.getRight(String action) and all comparisons are made using "equals" on strings. It is somehow unsafe since an extra space, typo or wrong case would produce errors. Also, an enumerated model would allow comparisons to be made using "==" which improves the readability of the code and the performance.

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              lucaa Anca Luca
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: