Loading Audio...

Listen to Lesson
0:00
  • Speed 0.5x
  • Speed 0.75x
  • Speed 1x
  • Speed 1.25x
  • Speed 1.5x
  • Speed 2x
  • Brian
  • Caris

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 (Global 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
    Enable Inheritance No
  4. Click Save.

  5. Return to the Object Editor UI, go to the Ticketing folder, 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.

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 (Global Menu), go to the Applications tab, and click Tickets under Custom Apps.

  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. Go to the Ticket Attachment tab.

  5.  Click Add (Add).

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

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

    • Email: renee.salinger@irisoptical.com
    • Password: learn
  8.  Open the Global Menu (Global Menu), go to the Applications tab, and click Tickets under Custom Apps.

  9. Verify that only the Iris Optical ticket appears.

  10. Verify you can access the ticket’s attachment.
    The attachment is accessible because the object inherits permissions from the Ticket object, which is restricted to the Iris Optical account. Without Root Object inheritance, you would have needed to define a separate relationship between Ticket Attachments and Accounts to enable account restriction.

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

    • Email: emily.hudson@retroeyewear.com
    • Password: learn
  12. Go to the Tickets page and verify that only the Retro Eyewear ticket appears.

Great! You've 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.

loading-knowledge-label