Forums de discussion

Displaying journal articles to users having view permission

Gubba swathi, modifié il y a 8 années.

Displaying journal articles to users having view permission

Junior Member Publications: 27 Date d'inscription: 06/09/12 Publications récentes
Hi All,

Can someone help me in finding a way to display journal articles to users who have "XYZ" role along with view permission.
All other users should not be able to view this journal articles. Am using Liferay 6.2 EE with sp11 patches.

I tried the below ways:

1) if(permissionChecker.hasPermission(journalArticle.getGroupId() , ournalArticle.getClassName(),journalArticle.getPrimaryKey() ,ActionKeys.view))
When i use this method its displaying all the journal article for administrator and none for non-admin and at times i am getting exception at view.

2) JournalArticlePermission.check(permissionChecker , journalArticle , ActionKeys.VIEW)
Even this all the journal articles are displaying.

3) Even tried ädding "journal.article.view.permission.check.enabled=true" in portal.ext properties file but no lucks.

Am i missing any configuration part?
Does this functionality working in default liferay?

Thanks and Regards
Swathi
Armando Ramirez, modifié il y a 7 années.

Displaying journal articles to users having view permission

New Member Publications: 14 Date d'inscription: 05/10/16 Publications récentes
Can you do this?
thumbnail
Mohammad Azharuddin, modifié il y a 7 années.

RE: Displaying journal articles to users having view permission

Expert Publications: 492 Date d'inscription: 17/09/12 Publications récentes
Use use JournalArticleServiceUtil it will fetch the list based on logged in user permission .

JournalArticleLocalServiceUtil will fetch all the records