留言板

Filtering blog posts based on categories or tags

Patrik Razem,修改在8 年前。

Filtering blog posts based on categories or tags

New Member 帖子: 2 加入日期: 15-8-5 最近的帖子
Hello,

I am getting newly acquainted with Liferay and here is my situation. I have a Liferay Portal CE 6.2. GA 4 running in which I need to create one main site. This site is available to every one, but what the user gets to see is based on which "role" this user is in.

Is there an easy way to filter the blog posts being shown to the user based on the category or tag which is assigned to a certain blog post? Kind of link a specific category to a specific role, as in "only users in the role role1 can see blog posts in the category role1", etc. Can this be done? Or maybe the same thing but for tags? I don't want to have to check and uncheck permissions for every blog entry, I would just like to assign it a tag or category.

Thank you in advance for yout help.
thumbnail
David H Nebinger,修改在8 年前。

RE: Filtering blog posts based on categories or tags

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Not supported OOTB, you'd have to create a hook to implement this.
thumbnail
Juan Gonzalez,修改在8 年前。

RE: Filtering blog posts based on categories or tags

Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子
Hi Patrik,

I am not sure if I understood your requirements, but I would do it this way:

* Use Asset Publisher portlet. Configure it to show only blogs with all of your categories/tags.
* For each category/tag, configure their permissions so it doesn't have VIEW permission for Guest user, and only have that VIEW permission for the role you want.

Then, only users with the role with right permissions should see those blogs.

Hope it helps...
thumbnail
Olaf Kock,修改在8 年前。

RE: Filtering blog posts based on categories or tags

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
Wow, so many different answers to this question - fascinating.

I'm always tempted to ask for the original usecase. Quite often this problem is not about permission (user A must never see content from category emoticon but about preferences (user A is typically interested in category A, is allowed to see category B as well - just typically not interested).

If it's this usecase, you should rather think along lines like "filtering relevant content" than along "permissions". This makes the system way better maintainable than solving such a problem with permissions.