Uploaded image for project: 'Apache Roller'
  1. Apache Roller
  2. ROL-1852

Weblog member management / role assignment not working

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0
    • 5.0
    • None
    • jboss-4.2.3, mysql, ubuntu 9.10

    Description

      Reassigning a weblog member's role (Members.java / Members.jsp) does nothing on a "save" operation.

      Reason #1: String sval = getParameter("perm-" + perms.getUser().getUserName()) is queried in stead of " ...getUserId()."

      .) Fixing this caused another error with the JPA revoke / grant permissions methods: openJPA threw an exception saying that the instance was already deleted and could therefore not be updated.

      The possible identified cause was that the revokeWeblogPermissions method did'nt commit the transaction, therefore the object id was still there. Also, only releasing the transaction made it possible to store the grants in the DB.

      .) Next in line: grantWeblogPermissions IMO used the wrong method: "addAction" instead of "setActions" --> this caused the permissions to be added instead of being replaced (i.e. leading to entries like "-1, admin, post" in roller_permission

      .) I added hashCode / equals methods to ObjectPermission and WeblogPermission (you can scrap those if you don't need them)

      .) WeblogPermission.orm.xml: corrected typos: "true" --> "TRUE"; apparently the queries are case-sensitive (at least on my system) which caused a lot of the permission queries / method not to work at all.
      --> please refer to the added patch file

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            djohnson David Johnson
            cblasnik Christopher Blasnik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment