- Liferay Beginner’s Guide
- Robert Chen Sandeep Nair Samir Bhatt
- 982字
- 2021-08-27 12:04:37
Time for action – accessing a portal with a normal user account
Now you are familiar with the Dockbar. We have also discussed how a Dockbar would be displayed to the admin user. However, what if you are accessing the portal as a normal user? What happens in this case? Would you be able to see all the options as an admin user can? Let's check it out:
- Sign out from the portal by clicking on the Sign Out link in the Dockbar.
- You will see a Sign In link on the top-right corner of the page. When you click on the link, it will display the Sign In portlet. Click on the Create Account link in this portlet. You will see the form displayed to create your account, as shown in the following screenshot:
- Fill the form to create your account and click on the Save button. When you click on the button, it will submit the form and display a message with the temporary password. It will also directly display the Sign In portlet for you to log in. Use the password to log in to the portal.
- Observe the Tomcat console at this moment. You should see a message Failed to connect to a valid mail server. Please make sure one is configured. This is because Liferay will send the temporary password to the e-mail address you provide during account creation. Since we have not configured the mail server, it will fail to connect to the server and will not send the password.
- Accept the terms of use and provide a password reminder query. Observe the Dockbar. Can you see all the options that were displayed when you logged in as an admin user? Also, try accessing the control panel. You will not be able to see most of the options that were appearing to the admin user—test@liferay.com.
- This happened because you have logged in as a normal user. Liferay has a very fine-grained permission system and access can be provided or restricted based on the role a user has. When you logged in with the default admin account, you had a Portal Admin role which enabled all the access in Liferay Portal. We will discuss about the roles in another section of this chapter.
- Take your mouse over to the Go To section. You will see My Public Pages and My Private Pages options but cannot see the liferay.com community. This happens because you are not yet a member of the liferay.com community.
- Click on the private or public pages link under the Go To section and observe the Dockbar. Can you see any difference from the previous view of the Dockbar? Also, try accessing the control panel from this page and you should see all the options. Sit back, relax, and think why this has happened!
Note
Your private and public pages belong only to you. You are the owner of those pages, so you have all the options available on those pages as an owner. Also, when you go to the control panel from your public or private pages, you can add or modify content of your community. So it displays all the links under My Community section.
Now, once you understand why this happened, click on your name, which appears in the top-right corner. It will take you to your profile page as displayed in the following screenshot:
Go through the different links in your profile. At this moment, you may not be able to get much out of these links, but don't worry. We will cover these links in detail in the following chapters.
Click on the link Password. It will allow you to change your password. Change your password and click on Save.
What just happened?
You have created a new user account. This is a normal user and not an admin. Liferay provided you a temporary password for this user account. When you logged in as the user, you had very limited access to the Dockbar because you do not have permissions to access all the options. When you went into My Public Pages and My Private Pages, you had full access to the Dockbar, because every user will behave as an admin of his/her public and private pages.
You have also modified your account by changing the password. As a normal user, you would be able to edit your account only. If you are a Portal Admin, you can edit any user's account.
You are now aware of the following concepts:
- Portal basics
- Different options available under Dockbar
- Difference between accessing the portal as an admin and as a normal user
- User's private and public pages
Pop quiz – select the correct answer
- Which of the following is true?
a. Every user must have public and private pages in a portal
b. Every user must have public pages in a portal
c. Every user must have private pages in a portal
d. A user can have public and private pages by default
- When would you prefer to provide public and private pages to the user?
a. A public facing website where a user can open his/her account freely
b. An intranet-fashioned website where you have a limited set of users
c. In all of the website
- Toggle Edit Control Functionality is used to:
a. Keep the Dockbar always on the top
b. Disable edit control options on the top of the portlets
c. Add new controls for editing a portlet
- A user's private pages are visible:
a. To the user only
b. To the members of the same organization or community only
c. To the user's friends only
d. Everyone
e. To user and portal admin only.
- Sitemap option under the Manage section of the Dockbar is used to:
a. Display the sitemap of the portal
b. Publish your site indexes to Google and Yahoo search engines for indexing