Thursday, July 9, 2015

Liferay Site Administrator Role customization


Site Admin roles and privileges

In Nutshell liferay has very good RAP system. Aka Roles and privileges. There are so many use cases been talking about the liferay roles and permission. Here I am gonna add one. which related to the Site Admin roles and customizing some sort of privileges for that roles. In General there are three "Site roles " are available. 

Site Administrator - Who have all the permission to with posts, pages, document library and other stuffs. Except one thing that , he can't assign another member as Site Admin as same this user holds.

Site Owner : This Role have all the privilege of what site admin have and one step ahead of him. He can assign any user as Site admin.

Think in this scenario, A role that contain only privilege to access user management of their own site.
Here I am going to share the steps and screenshot to solve this problem in liferay.

Environment : 
Liferay 6.2 CE GA3

1) Role creation

Role Name : SiteUserAdmin

Steps to create Role

a) Goto Control panel
Liferay portal → Admin ( Dockbar menu ) → Control panel

b) Roles (Under user section)

c) Add Site Role




d) Save Role

Save the form after Adding the role name , title and description. Refer below screen shot.




2) Define permission for Site Admin role
Permissions (Resource Permissions ) :
  • Assign Members
  • Assign User Roles
  • Go to Site Administration
Steps to assign permission :
a) Goto Site user Admin role → Action → Define Permission





b) Define Permission (Tab) → Site Administration (Left side tree panel )→ Users → Site Membership


c) Check and enable the following permission on the Resource Permission section
   Assign Members , Assign User Roles , Go to Site Administration



d) Click and save the configuration changes.


3) Assign User to Site User Admin Role For Sports Site
Follow the below steps to assign users to “ Site User Admin” role for Sports Site.

  a) Goto “Sports” site
            Liferay portal → Admin ( Dockbar menu ) → Control panel → Site
  b) Users (Left side panel) → Site Memberships


                                           

 c) Add site roles to users



 d) Search for “siteuseradmin”


e) Go to site user admin by clicking on the title column
(Prior to this step make sure user has already created and assigned to the “Sports” site)
Available tab → search for user → select the user → click on “Update Associate”



4) Test the Role
  Test the “ site admin role “ by login the thorough the assigned user.



Access the “Sports” site,
Admin ought to have only the users menu under site Administration section.


5) Goto Site Administration by Clicking on the Users under the Admin menu. Site user admin role have only permission to access the "Add members " and "Add Site Roles to". Here logged in user can manage the members and roles for the Sports site.



No comments:

Post a Comment

Merging two sorted arrays - Big O (n+m) time complexity

 Problem :  Merge the two sorted arrays. Edge case :  Array can empty Arrays can be in different size let getMaxLength = ( input1 , input...