Forum Discussion

phinnix's avatar
phinnix
Ideator III
6 years ago
Solved

How to disable the Lock button using a method during a Form OnLoad event

So here is my scenario... We are going to have users maintaining some Lists in Aras but we only want the user to be able to edit their lists and only their lists based on identity of the user logge...
  • Hi Phinnix,

    This kind of dynamic Permission model is already built into Aras Innovator without needing to add any custom logic or relationships. There are two system Identities called Owner and Manager that correspond to the identities set as an item's owned_by_id or managed_by_id. Any permissions given to the Owner Identity will be given to any Identity set as an item's owned_by_id. The same holds true for the Manager identity and the managed_by_id property.

    I'd recommend doing the following:

    1. Add fields for the owned_by_id and managed_by_id properties to the Form of the List ItemType
    2. Update the Permission of the List ItemType to give Edit permissions to the Owner and Manager identities
    3. Go to your "Available Design Materials" list item and set "Metal Work Management" as the owned_by_id
    4. Go to your "Design Shapes" list item and set "Design Department Administration" as the owned_by_id
    5. Confirm that the permissions work as expected

    This is a more flexible solution as it also ensures the same permissions are true even if the request comes from outside the client (maybe a future external app you use will have functionality to add values to Lists). More importantly, this also saves you the hassle of needing to write this functionality yourself. :)

    Chris


    Christopher Gillis

    Aras Labs Software Engineer