Foros de discusión

Add Scope to Events created with social-networking-portlets

thumbnail
Patrick NERDEN, modificado hace 11 años.

Add Scope to Events created with social-networking-portlets

New Member Mensajes: 10 Fecha de incorporación: 16/04/10 Mensajes recientes
For now, when using the Events Portlet, one could add Events to the entire portal only. It is not possible to restrict Events viewability to only one's site. Moreover, when displaying the portlet, it can only show the whole Event entries in the database for the current companyId ; it's not possible to only view the Events created inside the group.

I've added two attributes to the Event object : groupId and Visibility

Visibility allows the user to create either "portal-wide" events (public) or "site-restricted" events (private to the site they were created)

GroupId provides the user with the ability to filter the displayed events to show :

- All public events Portal-wide
- All events within this site
- All public events outside of this site

Thus :

- you can create portal-wide or site-restricted Events
- you can display a portlet to View and Create local Events
- you can display a portlet to View the Events of other sites
- you can display a portlet that summarizes all the public Events of all sites

I wish I could contribute those "improvements" that I made entirely the "Service Builder Way"

Here's the LPS : LPS-27129 ; SVN diff is attached to it.

I've attached the WAR file to this thread for those who want to test it. It's compatible with Liferay 6.1.x.

Available for any comment, criticism or discussion emoticon

See ya,

Patrick.
thumbnail
Patrick NERDEN, modificado hace 11 años.

RE: Add Scope to Events created with social-networking-portlets

New Member Mensajes: 10 Fecha de incorporación: 16/04/10 Mensajes recientes
Hi all,

I've modified what I've done to use Liferay's PermisionChecker. There's no more visibility variable persisted in the database. Instead, the module writes Permissions when adding a new meetup and removes permissions when the meetup is deleted. I've activated remote-services so that MeetupsEntryServiceImpl applies permissions and then calls MeetupsEntryLocalServiceImpl to perform the action.

This allows now users to even see their private meetings in a "portal-wide" portlet. I've added a function that calculates the visibility of the meeting based on the Permissions set. Private meetings appear on the portlet tagged with a special message.

There's an "ADD_MEETUP" action available that you can link to a Site Role. You can for example link it to SITE_MEMBER so that all Site Members can add Meetups or you can create a SITE_CONTRIBUTOR role so that Members cannot add Meetups but some privileged Members can.

New War available as an attached file emoticon

See ya