I work with liferay 5.2
I connected to liferay with this compte test#amazon.en
this compte has the Administrator role so he can show all page in liferay :
I want to display same page by role ,
to do this I create new role having this name : testRole
my goal is to display only link Users that is under Portal to the compte test#amazon.en
Updated :
I try with another way
I create page named pageTest
this page is under Supcom portlet
this is my portlet which is deployed in liferay
this is the Friendly URL of my page : pageTest
http://com.test:8080/group/Supcom/../control_panel/manage?p_p_id=125&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=11003&refererPlid=18603
I make /../ in order to eliminate Supcom portlet because users portlet is under control_panel portlet
this is the real link of users portlet in liferay :
http://com.tes:8080/group/control_panel/manage?p_p_id=125&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=11003&refererPlid=18603
my goal as I said is when I click in pageTest I will be forwarded in Users portlet
but I have an error when I try to save the Friendly URL of pageTest
Please enter a friendly url with valid characters.
Related
I am developing a Liferay module. I have a Liferay site's Friendly URL, and I want to get its Site ID (for instance 20143).
GroupLocalServiceUtil has several getGroup methods, but none seem to take a friendly URL as parameter.
GroupLocalServiceUtil has getFriendlyURLGroup method, you can get group, group id is site id.
Group group =GroupLocalServiceUtil.getFriendlyURLGroup(companyId,friendlyURL);
In Blog portlet in Liferay I want all my site users must be by default subscribed to the blogs for the site. Is there any property that we could set, but i didn't find one. I am new to liferay, so if anybody could help that would be great.
thankyou.
i have developed a portal using Liferay.I have two kind of users, guest user and Admin user. The login should be possible by the Admin only. The guest user should not be able to login , or even see the sign in button. How do i achieve this? through different url's?
You might consider the following approach:
Remove the login portlet from the theme template. (portal-normal.vm)
Create a hidden page on your Guest group. On this page you place only the login portlet. So only the people who know the direct URL are able to login. AFAIK there is no other way to achieve this, as you don't know if someone is an Admin before he entered his credentials ;)
[EDIT]
To remove the login portlet from the template you have to do the following steps:
A) If you don't have a custom theme
- Create a new Theme
- Parent of your new theme is classic
- Place portal_normal.vm in /docroot/_diffs/templates
- Remove these lines:
#if (!$is_signed_in)
<a data-redirect="$is_login_redirect_required" href="$sign_in_url" id="sign-in" rel="nofollow">$sign_in_text</a>
#end
That should remove the login link.
- Compile and deploy your theme
- Assign the theme to the portal as default theme. Assign the theme to your guest group Site.
Now you only have to create your hidden page and place the login portlet on it.
[/EDIT]
You can also consider an alternative approach if you know sth more about the admin users - e.g. their IP address / addresses, then you could modify the contents of a page in a similar manner as stated by Gevatterjan, but then you check not for the signed-in users, but the ones with specfic IPs.
How do we add an existing project(not a Liferay) in the form of a URL as a portlet in the Liferay portal.
If you have any existing web application running on somewhere else. You can use Liferay's iframe portlet. Just provide the URL of your application in the portlet.
Ref :
Iframe Portlet
I have a requirement that each user has a different set of portlets that he can see and manage based on his role.
I was initially thinking to model User Pages since I want each user to drag and drop the portlet around and set preferences. But then I realized I cannot have a single user home page and disable portlets based on role since all the portlets on a user page have view permission for "Owner"
Is something like this possible with Community home page. Can I configure a community home page with portlet which has role based permission. Every user will also have an option to drag around or add those portlets on the page and set permissions. I doubt I can give common access to all the user add portlet permission on the community page, since the page will be loaded with portlets.
In that case can I use the first approach and have flexibility to show set of portlets on user home page (private page) based on certain role and not have "Owner Role" interfere.