A Lookup Table represents a table with two columns: key and vale. It is used to map values that represents Lookups and Assets. So, they provide a way to filter Lookups and Assets.
Lookup Tables can be created inside the code, by creating a new instance of LookupTable.class or using Live's interface.
Permissions
Sometimes, developers may need to implement different forms of permissions to ensure correct filters. To do so, Live provides an extendable LookupTable which allows your own solution.
You just need to implement your own LookupTable and override the methods withSource and getFilteredLookupTable. The first one should return a new instance of the created class, and the second one should contain your implementation of permission.
Since the method getFilteredLookupTable is responsable to filter the LookupTable, you could use the LoggedUser passed by parameter or the Lookup which exists inside LookupTable.
Permissions based on Assets
Liverig already have an abstract generic LookupTable to get values of Assets. So, if you need control the permission based on Asset's permissions and perspectives, then we already have two LookupTables to do it.
The AssetNameKeyLookupTableshould be used to LookupTables which use Asset's name as key. While EventNameKeyLookupTableshould be used to LookupTables which use Event's type as key.