what acl do i make so that a user can only read the records they create?

juan9
Giga Guru

 

what acl do i make so a user can only read the records they create?

 
is it read, table.none, then in the script:
// Allow if user created the record if
(current.sys_created_by == gs.getUserName()) {
return true;
}
// Deny access if user didn't create the record
return false;
 
 
1 ACCEPTED SOLUTION

Community Alums
Not applicable

Yes, create a read ACL on your table (let’s say my_custom_table) with:

  • Operation: read

  • Type: table.None (or table.* if you want the rule to apply to all fields unless overridden)

if (current.sys_created_by == gs.getUserName()) {
    return true;
}
return false;

 

View solution in original post

3 REPLIES 3

Swapna Abburi
Mega Sage
Mega Sage

Hi @juan9 

Yes, you can create a Read ACL on table.none.

Either you can write the code in script field or directly add condition in the data condition.

 

SwapnaAbburi_0-1752187484845.png

 

Chaitanya ILCR
Kilo Patron

Hi @juan9 ,

 

Yes, Table.None 

Just this one line of code is enough 

 

current.getValue('sys_created_by')==gs.getUserName()

 

Regards 

Chaitanya 

 

Community Alums
Not applicable

Yes, create a read ACL on your table (let’s say my_custom_table) with:

  • Operation: read

  • Type: table.None (or table.* if you want the rule to apply to all fields unless overridden)

if (current.sys_created_by == gs.getUserName()) {
    return true;
}
return false;