Restricting Access to Object Data by Account

Available Liferay 7.4 U34+/GA34+

In scenarios with multiple business accounts, you may want to restrict access to object entries by account. To do this, your custom object must have an active relationship with the Account system object, and you must configure the custom object to use this relationship for restricting entry data. Once set up, anyone adding entries to the custom object must select an account. This account becomes the entry’s owner, so only account members can access it.

Restrict access to custom object entries by account.

Follow these steps to use accounts to restrict access to custom Object entries:

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

  2. Begin editing the Account system object.

  3. Add a One to Many or Many to Many relationship, relating the Account object to the desired custom object. See Defining Object Relationships for more information.

    Relate the Account system object to the desired custom object.

  4. Return to the Objects page and begin editing the desired custom object.

  5. In the Details tab, toggle Account Restriction to active and select the Account relationship you want to use for relating entries.

    Toggle Account Restriction to active and select the account relationship you want to use.

  6. Click Save.

This adds a new mandatory account selection field to the object, so anyone adding an entry must select an account. Available options are determined by the user’s account memberships. Once set, only members of the selected account can access the entry.

Additional Information