how to check if a user having domain visibility to add him in requested for?

Kiddy1
Tera Contributor

Hello,

 

I have scripted rest web service which creates request in various domains

some user belong to one particular domain and they have other domain visibility which is set in related list of user table(domain visibility) i have user sent in json while creating request

i have a validation made that check user domain in user table and allows him to create request in that domain itself,now i need to work on additional condition that if user has other domain visibility it should allow him to create request

 

plz suggest

code will be helpful

 

thanks in advance

 

 

6 REPLIES 6

Chris Sanford1
Kilo Guru

How is the domain of the request determined? Is it also passed in through the JSON? Users will not be able to create requests in domains they don't have access to, through rest web service or by any other means. This is out of box and no code is necessary to check this.

yes domain name is passed through json

Ok then yeah, if they don't have access or visibility to a particular domain, the request will fail. You don't need validation code for that.

hello chris thanks for replies,

when the user belongs to domain aaa and he has visibility over bbb and when i create a request through rest its giving me empty value in requested for after creation