- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 12:29 AM
Hi,
I have created a table in a scoped Application.How can I hide the "Delete"UI action in both form and list with out modifying Access controls?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 05:50 AM
Hi @Madhan007,
So my response is not lost in the thread, I'm reposting here.
Having reviewed your question, as @Anurag Tripathi has outlined, best practice here is to control this via ACLs.
Essentially you'll need to create 2 ACL's - one for 'delete' access, and the other for 'list edit' access.
Once you've specified exactly which role can delete (eg admin, however, I would encourage you to think about other users so admins/devs become an achilles heel to the process), all users that don't have the role will not be able to delete or see the UI Action.
Below, I've provided an ACL on the Problem table where only users who have the 'itil_admin' or 'problem_admin' role can delete a record. If a user views a Problem without this role, they will not see the 'Delete' button (The UI Action)
Reminder, you'll need to create an ACL for both the 'delete' and 'list_edit' actions.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 04:07 AM
Hi @Anurag Tripathi , for some reason we were advised not to edit/create the ACL's
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 06:01 AM
It is always best to ask the question 'why not' if some one mentions not to do something. As others have also pointed out: best practice to deal with the delete button, is by adjusting/creating ACL's. Do you know why that advise was given? It's against best practice at least.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 04:17 AM
Hi @Robbie , I tried && current.sys_class_name != 'your_table_name', it did not work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 05:50 AM
Hi @Madhan007,
So my response is not lost in the thread, I'm reposting here.
Having reviewed your question, as @Anurag Tripathi has outlined, best practice here is to control this via ACLs.
Essentially you'll need to create 2 ACL's - one for 'delete' access, and the other for 'list edit' access.
Once you've specified exactly which role can delete (eg admin, however, I would encourage you to think about other users so admins/devs become an achilles heel to the process), all users that don't have the role will not be able to delete or see the UI Action.
Below, I've provided an ACL on the Problem table where only users who have the 'itil_admin' or 'problem_admin' role can delete a record. If a user views a Problem without this role, they will not see the 'Delete' button (The UI Action)
Reminder, you'll need to create an ACL for both the 'delete' and 'list_edit' actions.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2024 01:45 AM
Hi @Madhan007,
Did you see my response which provides a solution?
So my response is not lost in the thread, I'm reposting here.
Having reviewed your question, as @Anurag Tripathi has outlined, best practice here is to control this via ACLs.
Essentially you'll need to create 2 ACL's - one for 'delete' access, and the other for 'list edit' access.
Once you've specified exactly which role can delete (eg admin, however, I would encourage you to think about other users so admins/devs become an achilles heel to the process), all users that don't have the role will not be able to delete or see the UI Action.
Below, I've provided an ACL on the Problem table where only users who have the 'itil_admin' or 'problem_admin' role can delete a record. If a user views a Problem without this role, they will not see the 'Delete' button (The UI Action)
Reminder, you'll need to create an ACL for both the 'delete' and 'list_edit' actions.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie