System.owner

1
i have a supervisor role that creates company and creates another supervisor and recruiter. i am trying to give delete right to company supervisor who creates the company so i need the company system.owner. how can i apply this?
asked
3 answers
1

 

Hey Rustu, i'm sure that u already got the correct answer about the steps of retrieving the owner of specific object. but in case you still can't reach the owner of an object after applying those step then it can be another issue please make sure to follow the steps to cover all scenarios and find out why you still can't reach the owner

 

1- check store owner check box on entity

2- then after creating the object let's assume it's an employee object

3- make sure that you are trying to reach an object's owner which was created after checking the store owner check box

4- [id = $Employee/System.owner] if you use this in an activity or xPath you should be able to reach the user that has created that employee’s object

 

finally if you followed the steps and still you get the system owner as null then i can assure you it's 100% true that the object which

you are trying to reach it's owner was being created by anonymous user, in other words that employee has created his self as anonymous user,

so when this object was saved into your data base,

the system could not save the owner account's info cause it was not there yet so it makes sense if you get this owner as null !

i hope this help !

answered
2

Hi Rustu,

You can store the owner of the object Company in the entity from the domain model like so:


With this information stored, you could set up an access rule to delete the object:


And set the constrain so that only the owner of the Company object is able to delete it:


I hope that solves your question, if so please mark it as solved, thank you and best regards!

answered
0

When I am  trying to reach company owner I am getting always null. I can not reach the owner of the company entity. I am missing something on the creating company the relation with the owner can not built up.

answered