Foros de discusión

[Resolved] Unauthenticated Message Board posts

thumbnail
Olaf Kock, modificado hace 14 años.

[Resolved] Unauthenticated Message Board posts

Liferay Legend Mensajes: 6396 Fecha de incorporación: 23/09/08 Mensajes recientes
We're currently in the process of releasing a lirefay instance that utilizes a public community for an open source project - this community contains a message board, where members of the community are allowed to post, just like here on liferay.com (though currently without the wiki).

There's one problem that I find difficult to reproduce, regarding the interface for anonymous - e.g. non-authenticated - users: The message boards seem to allow anonymous contributions, as there are "Create new Thread" and "Reply" links available in the message board categories and on the messages. However, anonymous guests are not allowed to post, but with this link they are able to enter their comment and submit it. At this time access control steps in and tells them that they have no permission to post, which usually discards their edits and really annoys them.

So it seems that permissions are set correctly, but the view for a message board doesn't reflect this and offers the "edit/add/reply" links, which might set off users if they start to edit lengthy questions only to be told that they can't post when they submit.

We're using 5.2.2 and - funny enough - I've not been able to reproduce this on another instance of 5.2.2. I'm probably going to patch the message board jsps as a quick fix, but I'd like to know if somebody knows of common pitfalls that might lead to this behaviour.

These are the settings that I recall with regards to user roles and access control:

Users, upon signup, are associated to the role "User" and a user group "Default Group" - this is where they get their personal community pages from. They are not associated with the community. Instead, authenticated users have various "portlet permissions" on the message board portlet for this community (through "Roles"/"Users"/"Define Permissions"/"Portlet Permissions"), like "View", "Add Message", "Reply to message", "Add File" etc.)

There are no special settings for Guest (e.g. all portlet permissions are empty by default)

The message board portlet has been configured to disallow anonymous posts, though I expected this to be an option for authenticated users to check the box, indicating the post should not reveal their name. However, the issue came to our attention when the very first post to the board happened to be an anonymous one, made by a user not signed in. The anonymous posting is since deleted and has been replaced by the user himself after signing in.

The permissions in the message board portlet (through the portlets configuration/Permissions) are default, e.g. "Guest" can "view", "Owner" has "configuration" and "view" checked and "Community Member can "view".

Any ideas where to continue to look? All I need is the links (marked in the screenshot) to reflect the actual permissions that are already honored - e.g. they should not be there for unauthenticated users.
thumbnail
Amos Fong, modificado hace 14 años.

RE: Unauthenticated Message Board posts

Liferay Legend Mensajes: 2047 Fecha de incorporación: 7/10/08 Mensajes recientes
Hi Olaf!

Users, upon signup, are associated to the role "User" and a user group "Default Group" - this is where they get their personal community pages from. They are not associated with the community. Instead, authenticated users have various "portlet permissions" on the message board portlet for this community (through "Roles"/"Users"/"Define Permissions"/"Portlet Permissions"), like "View", "Add Message", "Reply to message", "Add File" etc.)


Sounds like this bug here:
http://issues.liferay.com/browse/LPS-2176
thumbnail
Olaf Kock, modificado hace 14 años.

RE: Unauthenticated Message Board posts

Liferay Legend Mensajes: 6396 Fecha de incorporación: 23/09/08 Mensajes recientes
Sounds promising. I've been looking for "message board" and "forum" keywords and obviously this doesn't contain either.

I'll try next week and report back. Thank you!
thumbnail
Olaf Kock, modificado hace 14 años.

RE: Unauthenticated Message Board posts

Liferay Legend Mensajes: 6396 Fecha de incorporación: 23/09/08 Mensajes recientes
Amos,
thanks, that's it! Works well and the patch was easy.