Foren

Allow Guests to add web content

Meditel Meditel, geändert vor 12 Jahren.

Allow Guests to add web content

New Member Beiträge: 15 Beitrittsdatum: 31.12.11 Neueste Beiträge
Hi,

Is there a way to allow Guest to add web content ? I can't fin how to do this such simple thing :-/

BR,
Meditel
thumbnail
David H Nebinger, geändert vor 12 Jahren.

RE: Allow Guests to add web content

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
This is not a realistic requirement...

Can you imagine a disgruntled user going to your site and adding web content that says your company blows? You'd have no way to trace it back to them, and it would stay up there until you realized it was there...

In general I don't think you'd want to support this...
Meditel Meditel, geändert vor 12 Jahren.

RE: Allow Guests to add web content

New Member Beiträge: 15 Beitrittsdatum: 31.12.11 Neueste Beiträge
Yes but we can imagine a workflow validation for the content before being published emoticon
Moreover, if i take your example then an identified user can also post what he wants ...

The idea is to let people add content and controle what they add via a workflow ..

Thanks,
Meditel
Charles Austin, geändert vor 12 Jahren.

RE: Allow Guests to add web content

New Member Beiträge: 4 Beitrittsdatum: 28.01.11 Neueste Beiträge
Hi Meditel,

Unsupported Guest permissions can be enabled for Web Content by editing the file "journal.xml" in the following directory: [source]/portal-impl/src/resource-actions

In this file you'll see several sections named "guest-unsupported"--any permissions listed here will be unavailable for the Guest account in the portal. Simply comment these out and they should become available when defining permissions for the Guest role.

However, I would personally agree with David, in that allowing guests to add web content might get out of hand, since Liferay's web content is a pretty powerful tool designed for serious web development as opposed to open community collaboration. Maybe the Wiki would better serve your purposes (you can add guest permissions in the same way by using wiki.xml instead). Even so, if you can come up with a workflow design that works well with this, then more power to you! It should be possible; it just might take a little more effort than it would with the wiki.

I hope this helps! emoticon

--Chas
Meditel Meditel, geändert vor 12 Jahren.

RE: Allow Guests to add web content

New Member Beiträge: 15 Beitrittsdatum: 31.12.11 Neueste Beiträge
Charles Austin:
Hi Meditel,

Unsupported Guest permissions can be enabled for Web Content by editing the file "journal.xml" in the following directory: [source]/portal-impl/src/resource-actions

In this file you'll see several sections named "guest-unsupported"--any permissions listed here will be unavailable for the Guest account in the portal. Simply comment these out and they should become available when defining permissions for the Guest role.
--Chas


Hi Charles,

Thanks for the hit.
Unfortunately it is not working. I have this exception when trying to Define Permissions for Guest people :



12:48:56,417 ERROR [JDBCExceptionReporter:75] data exception: invalid character value for cast
12:48:56,464 ERROR [IncludeTag:426] Current URL /group/control_panel/manage?p_p_id=128&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=19&refererPlid=10169&_128_struts_action=%2Froles_admin%2Fedit_role_permissions&_128_redirect=http%3A%2F%2Flocalhost%3A8080%2Fgroup%2Fcontrol_panel%2Fmanage%3Fp_p_id%3D128%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview%26doAsGroupId%3D19%26refererPlid%3D10169%26_128_struts_action%3D%252Froles_admin%252Fview%26_128_cur%3D1%26_128_delta%3D20%26_128_keywords%3D%26_128_advancedSearch%3Dfalse%26_128_andOperator%3Dtrue%26_128_description%3D%26_128_name%3D%26_128_type%3D0%26_128_orderByCol%3Dname%26_128_orderByType%3Dasc&_128_cmd=view&_128_roleId=16 generates exception: com.liferay.portal.kernel.exception.SystemException: com.liferay.po


any idea ?

Best regards,
Meditel
Charles Austin, geändert vor 12 Jahren.

RE: Allow Guests to add web content

New Member Beiträge: 4 Beitrittsdatum: 28.01.11 Neueste Beiträge
Hmm, I haven't seen that before. Is it possible that you might have commented out the <guest-unsupported> tags themselves? You'll get exceptions if those parts of the XML aren't there, even if you intend for them to be empty. For example, the code should look like this:


			<guest-unsupported>
<!--			<action-key>ADD_ARTICLE</action-key>
				<action-key>ADD_FEED</action-key>
				<action-key>ADD_STRUCTURE</action-key>
				<action-key>ADD_TEMPLATE</action-key>
				<action-key>SUBSCRIBE</action-key>-->
			</guest-unsupported>


And not this:

<!--		<guest-unsupported>
				<action-key>ADD_ARTICLE</action-key>
				<action-key>ADD_FEED</action-key>
				<action-key>ADD_STRUCTURE</action-key>
				<action-key>ADD_TEMPLATE</action-key>
				<action-key>SUBSCRIBE</action-key>
			</guest-unsupported>-->


Aside from that, the JDBC error makes me think the issue might be rooted in your database. Since this change requires the portal to be rebuilt from source, make sure you're using a fresh database when you start up for the first time.