Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Anudeep K
Manage Pages Restiction based on roles
January 3, 2013 2:46 AM
Answer

Anudeep K

Rank: New Member

Posts: 4

Join Date: November 24, 2012

Recent Posts

Hi,

I am new to liferay.
I have a requirement to restrict some of the pages in 'Manage Pages' portlet to particular group of people.

Brief explanation:
Suppose if i have 5 menu pages and under each menu page we have another subpages.
Then the 'Manage pages' view will be something like this.
>liferay

>page1
>page2
>page3
>page4
>page5


Here each menu page can expand and collapse.

Now for a particular group of people we have to restrict addind/editing/deleting pages.

I tried in this way.
I created a role and definned the permission-->portal-->communities-->communit-->manage pages.
And assigned the role to the user.
Now the user is able to see the 'pages' menu in control-panel.
And also heis able to do all the operations like adding/creating/deleting the pages.
But how to restrict the user to not to create/edit/delete a page?

Am i going in a wrong way.

Please guide me some steps.

Thanks in advance
Anudeep K
Rahul Sharma
RE: Manage Pages Restiction based on roles
January 3, 2013 4:16 AM
Answer

Rahul Sharma

Rank: Junior Member

Posts: 60

Join Date: January 10, 2012

Recent Posts

You have define a role which is of type "Regular" and then define permission of him stating under the category -->portal-->communities-->community-->page.
Then set its scope for the community and set this new role to any user. But you need to remove all other roles whether they are Community roles or Regular roles.

Hope this helps!
Oliver Bayer
RE: Manage Pages Restiction based on roles
January 3, 2013 4:49 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 870

Join Date: February 18, 2009

Recent Posts

Hi Anudeep,

afaik it's not possible ootb without coding a custom solution. Maybe you can use custom attributes for the type page to assign roles to pages. Another solution would be to divide the pages to different sites/communities so you can have a role for each site.

HTH Oli
Anudeep K
RE: Manage Pages Restiction based on roles
January 3, 2013 6:36 AM
Answer

Anudeep K

Rank: New Member

Posts: 4

Join Date: November 24, 2012

Recent Posts

Thank you oli and rahul for replying me.

@rahul: I tried with creating community role.
But that dint help.Still i am not able to restrict pages(create/edit/delete).

@oli: The approch what i did with 'regular role' and
the approach what rahul has suggested with 'community role'.
Both the aproaches are working for document library/image gallary and some more portlets.
There i am able to restrict some folders and files.
But not for 'Pages' in control panel. Is there any particular reason for that?


Thanks and regards
Anudeep Kota
Rahul Sharma
RE: Manage Pages Restiction based on roles
January 4, 2013 12:41 AM
Answer

Rahul Sharma

Rank: Junior Member

Posts: 60

Join Date: January 10, 2012

Recent Posts

Hi,

In simple way have you tried to create a role of type "Regular" and then "define permission" on role i.e going to "category" >portal-->communities-->community-->page (not manage page) and then set its "limit scope" to the specific community you want this role must govern and finally set the "permission" of this role to only "view",after the whole process set only this custom role to the desired user and remove all other roles if present.
It will definitely state permission on the page.
Anudeep K
RE: Manage Pages Restiction based on roles
January 4, 2013 3:48 AM
Answer

Anudeep K

Rank: New Member

Posts: 4

Join Date: November 24, 2012

Recent Posts

Hi Rahul,

Thank you Rahul for helping me.
As mentioned by you i created a role with 'Regular' category and while defining the permissions to the role
under the category as you said >portal-->communities-->community-->page (not manage page)
But here i am not able to find 'page' under community.

Under Communities i am having categoris: community and page as two different categories under Communites.
community is having options like
Approve Proposal
Assign Members
Assign Reviewer
....
update
But not 'page'.

page is having options like
Add Discussion
Delete
Delete Discussion
....
Permissions

Please tell me which is correct permission to select?


Note: I am using liferay 6.0


Thanks and regards
Anudeep Kota
Rahul Sharma
RE: Manage Pages Restiction based on roles
January 4, 2013 4:16 AM
Answer

Rahul Sharma

Rank: Junior Member

Posts: 60

Join Date: January 10, 2012

Recent Posts

Follow the same portal-->communities-->community-->(beneath the community heading you will find) page heading,set only the "view" permission to it.
Hope that helps!
Anudeep K
RE: Manage Pages Restiction based on roles
January 4, 2013 7:04 AM
Answer

Anudeep K

Rank: New Member

Posts: 4

Join Date: November 24, 2012

Recent Posts

Hi Rahul,

Thank you for your cooperation.

I gave the permission portal-->communities-->community-->page-->view to my 'Regular' role.

But when i enter into the portal control-panel with that user who is assigned with this role i am not able to see 'Pages'(Manage Pages portlet) option.

My Actual requirement is to restrict some of the pages(creation/deletion) in 'Manage Pages' portlet.
But in this scenario i am not able to get 'Pages'(Manage pages) option in control panel itself to that user.

Should i give any other permission to see 'Pages'(Manage Pages portlet) in control panel?

I think i am following you correctly.

Thanks and regards
Anudeep Kota