- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 03:34 AM
Users with Role A should have write access to all field except Configuration Item on incident table and Role B should have write access to Configuration Item field and all other fields should be read only?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 03:41 AM
so what did you start with?
It's an easy requirement
1) field level WRITE on Configuration Item field -> Advanced script check logged in user
gs.getUserID() == 'user B sysId'
2) Table.* WRITE ACL and advanced script
gs.getUserID() == 'user A sysId'
OR
You can use onLoad client script if you don't want to mess with ACLs
If my response helped please mark it correct and close the thread so that it benefits future readers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 03:45 AM
Hi @sanyalshubh
you can perform the below way :-
Reference :-
1. Create new Table.None Read ACL and add both Role A and Role B which will allow both users to get row level read access.
2. Create new Table.None Write ACL and add both Role A and Role B which will allow them to get row level write access.
3. Create new Table.* Write ACL and add Role A only which will allow Role A users to edit all fields on incident table.
4. Create new Table.configuration_item Write ACL and add Role B which will allow only Role B to edit configuration item and it will not provide editable access to Role A users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 03:51 AM
@sanyalshubh You need to create two write ACLs on the incident table.
1. incident.* In this ACL add the Role A in the role list
2. incident.configuration_item, Add Role B in the role list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 03:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 03:41 AM
so what did you start with?
It's an easy requirement
1) field level WRITE on Configuration Item field -> Advanced script check logged in user
gs.getUserID() == 'user B sysId'
2) Table.* WRITE ACL and advanced script
gs.getUserID() == 'user A sysId'
OR
You can use onLoad client script if you don't want to mess with ACLs
If my response helped please mark it correct and close the thread so that it benefits future readers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 03:45 AM
Hi @sanyalshubh
you can perform the below way :-
Reference :-
1. Create new Table.None Read ACL and add both Role A and Role B which will allow both users to get row level read access.
2. Create new Table.None Write ACL and add both Role A and Role B which will allow them to get row level write access.
3. Create new Table.* Write ACL and add Role A only which will allow Role A users to edit all fields on incident table.
4. Create new Table.configuration_item Write ACL and add Role B which will allow only Role B to edit configuration item and it will not provide editable access to Role A users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 03:46 AM
onload client script like this
function onLoad() {
var userId = g_user.userID;
var fields = g_form.getEditableFields();
if (userId == 'user B sysId') {
for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], true);
}
g_form.setReadOnly('cmdb_ci', false);
} else if (userId == 'user A sysId') {
for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], false);
}
g_form.setReadOnly('cmdb_ci', true);
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.