TL;DR
How to allow read-only access to some users on one replica (in an Sql Server availability group), only when the replica is secondary, and deny it when it becomes primary?
Explanation
I'm thinking of an availability group setup, where there will be two replicas, one of them readable when it is secondary. The non-mission-critical reader applications (like BI and such) connect to the secondary; they cause a considerable amount of load on that replica; there is plenty of unused resources (since it is secondary replica), so no worries.
Now, the primary fails and the secondary becomes the primary; the reading load is not desired since it will effect mission-critical loads (that are transferred to the new primary). We can tolerate outage on non-mission-critical readers, so we desire their respective users become disabled and kicked-out until the replica becomes secondary again.
How would it be possible?