How to provide add-to-page functionality for custom role user - liferay

My requirement is that I have a student user and student role . I have mapped this user with student role. Admin will provide few portlets for student role.So, when he gets sign in to the portal he could able to add / decorate whatever the portlets he can access. I want to provide the add to page functionality with limited access. I hope now it's clear.

I would suggest you start off by reading the Liferay User Guide, in particular the section that can be found here:
http://www.liferay.com/es/documentation/liferay-portal/6.1/user-guide/-/ai/managing-users-user-groups-organizations-sites-teams-and-roles
This isn't really a programming question, and would probably be better suited being asked over at ServerFault.com unless you're trying to do this in code.

Related

Liferay get all users of organization role (by organization role name)

I have an organization role in Liferay and in this organization role are users. I want to get this users now. Furthermore I want to specify the organization name of the role.
So is there something like
xxxServiceUtil.getUsersByOrganizationRoleName(String myOrganizationRoleName);
Thank you in advance.
One principle throughout Liferay's API is: If you look for a User, then you go through UserLocalService. That's your first hint on where to look.
Since Liferay 7.0, you should not use the *Util classes any more, but just obtain a #Reference to the service directly.
Looking at the service, you'll notice that it has a getRoleUsers method. However, I can't tell you if this also takes Organization-scoped roles or only portal/instance scoped ones. In case it doesn't reveal what you like, you might need to go through getOrganizationUsers and filter on from there, or start with a DynamicQuery, which you can also find within the same service (following the principle that opened this answer)

How to hide site membership option for site owner/admin in liferay

I have created a separate module for creating and assigning users for site admin/owners. So I don't want to show the "Site Membership" option under Users tab for both Site admin and owner.
How can I hide the Site Membership option?
Is there any way that the permission or configuration will do the
required change? Or do I need to create the hook?
Any suggestions please?
Rather than changing the semantics of Liferay's built-in roles, rather introduce your own custom roles and define the permissions that you want them to have. Create a "site role", choose "Define Permissions" and add what you need.
From your comment I understand that you want to use Site Admin, just not with everything this role comes with. It sounds strange to me that you're demanding a certain solution and favor one that doesn't work, but so be it.
You can check if it's possible to remove some permissions from the "Site Admin" role, but I'd expect a very hard-to-maintain-system resulting from this. Liferay has no means of "maintaining only the users that a certain Administrator has created". What you can do is: An Organization Administrator can administer all users in the organizations they're administering. This might be another solution for you.
Or alternatively, implement your own UI and do your custom (non-Liferay-based) permission checks in it. This UI will then enable your custom admins to administer the users that the UI provides for them.
But if you're stuck to a certain solution, you might be out of luck. Give us more details of your problem and we might come up with a solution unless you insist that your solution is the way to go.
With Permissions, no you can't. You can't change the permissions of the LR default role by UI at least.
You might have to go with hook or ext. One other way around is to do it with the theme. You might have to hook into Liferay's control panel theme.

With liferay how to give different permission to different users as their Roles?

With liferay how to give different permission to different users as their Roles?
I had just installed liferay Portal on my PC, what I want is to make one page and there are three users in that with different roles. (e.g only view blog, Only edit the blog entry, view, edit blog entry..etc..)
It was easy to create role and their permission, but some how I can't make it the way I wanted. I just want that same page can be accessed by users with different permission as their roles.
I had tried to Google for any tutorial for that kind of thing which can guide me but not found any good link, so is there any tutorial that can fulfill my requirement that how to give different permission on the same page. Can anyone provide me good reference link for tutorial of liferay permissions for user?
I guess following link will do the job for you !
http://www.liferay.com/community/forums/-/message_boards/message/8131940

Setting secret questions and answers for users in Orchard CMS

I would like to have the user registration be a little more secure by adding security questions. I could create a new contentpart and attach it to user contentitem. But before I do that I would like to know if its not already there.
You can use the extended registration module and add the security questions there - I am using this module to capture other user information and it works great. However my workflow is such that an admin creates users....so this might be different from your workflow where the user will be entering their own registration info.

Limiting Access to Certain User Profiles

How can I limit access to user profiles so that only users with a specific role can be viewed globally.
What I'm trying to do is make accessing users with "writer" role possible for all users, but leave normal members inaccessible to all but admin.
(Originally posted this as a comment but I guessed it helped so I'm posting it as an answer.)
You might want to see whether the Profile 2 module might be able to help you. The writer role would then have permission to create a profile for all to see while others do not. Also, you could modify the way users list other users' profiles. You could use the Views module use a filter so that it only shows users of a certain role

Resources