ACLs Write fields on table if me, be able to write a field if not me

kemmy1
Tera Guru

I want to be able to update all fields on a record, if a reference field (to sys_user) is me.  (so users can only updated their own record.)  It's a profile type record.  I don't want person a to update person b address.

 

BUT

 

You can sponsor a a profile.  Person A would be on person B's record as a sponsor.  And I want this sponsor to be able to update on field on person B's profile record.

 

[table] write  - [role] and condition = reference field is ME.

[table].field write - [role] and condition = sponsor field is ME.

 

It's not working, probably because of the [table] write acl?

 

Lisa

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@kemmy1 You need to define the table level access for sponsor too.

 

Here is the recommended structure for your table level ACL

[table] write  - [role] and condition = reference field is ME.

                                              OR

                          [role] and condition = sponsor field is ME.

 

Here is the structure for your field level ACL

 

For access on fields where the profile owner and sponsor both should have write access

 

[table].field write - [role] and condition = sponsor field is ME.

                                                               OR

                                [role] and condition = sponsor field is ME.

 

ACL for those fields where only profile owner can have write access.

[table].field write - [role] and condition = sponsor field is ME.

 

Hope this helps.

View solution in original post

1 REPLY 1

Sandeep Rajput
Tera Patron
Tera Patron

@kemmy1 You need to define the table level access for sponsor too.

 

Here is the recommended structure for your table level ACL

[table] write  - [role] and condition = reference field is ME.

                                              OR

                          [role] and condition = sponsor field is ME.

 

Here is the structure for your field level ACL

 

For access on fields where the profile owner and sponsor both should have write access

 

[table].field write - [role] and condition = sponsor field is ME.

                                                               OR

                                [role] and condition = sponsor field is ME.

 

ACL for those fields where only profile owner can have write access.

[table].field write - [role] and condition = sponsor field is ME.

 

Hope this helps.