Granular role access on a per Entity basis I have a config entity that I would like to grant access to on a role based level. There is going to be one role to access the entities, but how can I assign access on a per entity basis?

My naive thinking is to add a $roles array instance variable, and add each individual role to that, then create a custom EntityAccessControlHandler class, implementing EntityAccessControlHandlerInterface that checks the array for all of the users roles, but that doesn't seem like a very good solution.
but that doesn't seem like a very good solution.


Yes, it is.

What you're saying makes perfect sense, just do it :)

access() (or checkAccess()) is called for each entity separately, you can implement any imaginable logic in there, that's completely up to you.