Mastering Data Modeling with Liferay Objects

Course Overview

Restricting Accounts for Clarity's Ticketing App

So far, you’ve learned about how account restrictions can enhance security by segmenting data access for different sets of users. Now, you’ll apply this knowledge to Clarity’s ticketing system to ensure that tickets are only accessible to specific accounts.

Exercise: Enabling Account Restriction for Tickets

Here you’ll establish account restriction for the Ticket object.

  1. Open the Global Menu (Applications Menu), go to the Control Panel tab, and click Objects.

  2. In the Default object folder, select the Account system object.

  3. Go to the Relationships tab, click Add (Add), and enter these details:

    Field Value
    Label Account to Tickets
    Name accountToTickets
    Type One to Many
    Many Records Of Ticket
  4. Click Save.

  5. Return to the Objects overview page and select the Ticket object.

  6. On the Details tab, go to Account Restriction and toggle Enable Account Restriction.

  7. Set Account Restricted Field to Account to Tickets.

  8. Click Save.

If you see an Internal Server Errorwhen trying to save, make sure you’ve installed the workspace’s hotfix.

Great! You've configured account restriction. This ensures that all new tickets are linked to individual customer accounts and are only accessible by account members.

Exercise: Creating Tickets to Verify Account Restrictions

Here you’ll create tickets to test the newly enabled account restriction.

  1. Open the Global Menu (Applications Menu), go to the Control Panel tab, and click Tickets.

  2. Click Add (Add) and select Iris Optical for the Account to Ticket field.

  3. Fill out any mandatory ticket details and click Save.

  4. Repeat the steps above to create a second ticket, this time selecting Retro Eyewear for the Account to Ticket field.

  5. Log out and log in as Renee Salinger of Iris Optical.

    • Username: renee.salinger@irisoptical.com

    • Password: learn

  6. Open the Global Menu (Applications Menu), go to the Control Panel tab, and click Tickets.

  7. Verify that you see only the ticket for Iris Optical created in this exercise.

  8. Log out and log in as Emily Hudson of Retro Eyewear.

    • Username: emily.hudson@retroeyewear.com

    • Password: learn

  9. Go to the Tickets page and verify that you see only the ticket for Retro Eyewear created in this exercise.

Great! You have verified that the newly enabled account restriction for tickets is working as intended.

Conclusion

Congratulations! You've successfully enabled account restrictions for Clarity's ticketing system, enhancing data security. This ensures that tickets are accessible only to authorized users within their respective accounts. Next, you’ll learn about auditing objects in Liferay.

  • Exercise: Enabling Account Restriction for Tickets

  • Exercise: Creating Tickets to Verify Account Restrictions

  • Conclusion

Loading Knowledge

Capabilities

Product

Education

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy