I’ve scoured the web looking for info on the way to obtain this performance to no avail. I’m hoping I can get a solution right here.
I’ve a content material kind referred to as ‘Server’ on my web site. One of many fields on ‘Server’ is an ‘Entry Function’ discipline, which is an entity reference of consumer roles.
When a brand new piece of content material is made, the creator selects one (or a number of roles) which have entry to this piece of content material (The creator cannot be granted the ‘handle roles’ permission, to allow them to’t use the usual ‘permissions’ choices obtainable when creating content material).
I’ve a view setup (that could be a REST EXPORT of kind key_auth. When a consumer accesses the endpoint utilizing their auth key, the view ought to return a listing of server content material that matches ONLY if one of many customers roles is within the entry roles discipline for the piece of content material. I can not seem to learn the way to attain this utilizing views and filters.
Entry Roles: Developer, Testing
Entry Roles: Administrator
The consumer accessing the endpoint doesn’t have the administrator function, however does have the Testing function. When the consumer accesses the endpoint, solely ‘Server 1’ ought to return for them, since that is the one server that matches considered one of their roles. If extra servers matched, these servers could be displayed, too.
I’ve the entry roles setup, and the view setup to attach the api key to the proper consumer, however cannot determine the way to set the filter as much as match consumer roles to one of many attainable entry roles on the server content material.
Is there anyone that would provide me some help?