Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
venka reddy
How to retrieve blogs entry role
29 août 2013 11:18
Réponse

venka reddy

Rang: Regular Member

Publications: 231

Date d'inscription: 23 mars 2011

Publications Récentes

Hi,

How Can we retrieve roles for the blog entries i.e I want to retrieve the roles, who have view permission for the blog post.

can suggestions?
Ahmed Hasan
RE: How to retrieve blogs entry role
29 août 2013 11:19
Réponse

Ahmed Hasan

Rang: Expert

Publications: 306

Date d'inscription: 13 avril 2007

Publications Récentes

Hi Venka,

You can retrieve this in information from the ResourcePermission table my making use of the appropriate API's that Liferay provides.

Yours truly,
Ahamed Hasan
Author, Liferay Portlet Cookbook
venka reddy
RE: How to retrieve blogs entry role
29 août 2013 12:18
Réponse

venka reddy

Rang: Regular Member

Publications: 231

Date d'inscription: 23 mars 2011

Publications Récentes

Thanks for reply.

I have gone through the ResourcePermissionLocalserviceImpl, I didn't get the method that is useful.

Can you elaborate it?
Dhrutika Vyas
RE: How to retrieve blogs entry role
30 août 2013 06:51
Réponse

Dhrutika Vyas

Rang: Expert

Publications: 438

Date d'inscription: 9 février 2009

Publications Récentes

Hi Venka,

May be you can check using PermissionChecker.hasPermission(long groupId, String name, long primKey, String actionId);

If it returns true that get Role of the user.

Regards,
Dhrutika
venka reddy
RE: How to retrieve blogs entry role
30 août 2013 09:49
Réponse

venka reddy

Rang: Regular Member

Publications: 231

Date d'inscription: 23 mars 2011

Publications Récentes

Hi Dhrutika,

Thanks for reply, very helpful.

Also I need to get the roles of other users who have view permission the blog post, As you said it will reterive the current user roles.

Any Suggestions?
Dhrutika Vyas
RE: How to retrieve blogs entry role
2 septembre 2013 23:15
Réponse

Dhrutika Vyas

Rang: Expert

Publications: 438

Date d'inscription: 9 février 2009

Publications Récentes

Good to know it helped you.

Same method should help you. If that method returns true get that user's role.

Regards,
Dhrutika
Ahmed Hasan
RE: How to retrieve blogs entry role
3 septembre 2013 00:41
Réponse

Ahmed Hasan

Rang: Expert

Publications: 306

Date d'inscription: 13 avril 2007

Publications Récentes

Hi Venka,

I have the solution with me. But i am not finding time to get the complete code and send to you. If you are in bangalore, we can probably spend some time and i can sit with you to do this and give the working code.

Yours truly,
Ahamed Hasan
Author, Liferay Portlet Cookbook