You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by "Dave Johnson (JIRA)" <ji...@apache.org> on 2010/03/02 05:11:27 UTC

[jira] Resolved: (ROL-1852) Weblog member management / role assignment not working

     [ https://issues.apache.org/jira/browse/ROL-1852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Johnson resolved ROL-1852.
-------------------------------

    Resolution: Fixed

Author: snoopdave
Date: Tue Mar  2 04:03:15 2010
New Revision: 917868

URL: http://svn.apache.org/viewvc?rev=917868&view=rev
Log:
Fix for "Weblog member management / role assignment not working"
https://issues.apache.org/jira/browse/ROL-1852

Two problems:
1) JPAWeblogManager.addWeblog() was giving blog owner ADMIN and AUTHOR actions, when user should have only 1
2) Members.java was using username where it should have used ID

I didn't use Christopher's patch, but I did use some ideas from it (i.e. the id vs. username fix). Thanks!

> Weblog member management / role assignment not working
> ------------------------------------------------------
>
>                 Key: ROL-1852
>                 URL: https://issues.apache.org/jira/browse/ROL-1852
>             Project: Roller
>          Issue Type: Bug
>          Components: JPA Backend, User Management
>    Affects Versions: 5.0
>         Environment: jboss-4.2.3, mysql, ubuntu 9.10
>            Reporter: Christopher Blasnik
>            Assignee: David Johnson
>             Fix For: 5.0
>
>         Attachments: Weblog-member-management.patch
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.