Only allow a single role assignment per class

Hi,

we would like to have a way to restrict departments to a single business role or eset per class.
But inheritance should work as expected, unless there is a more specific assignment.
We have about 6000 departments and the tree is about 10 levels deep.

Example:

Department 1 Role A
|_ Department 1.2 Role A
    |_ Department 1.2.1 Role A
        |_ Department 1.2.1.X Role B (but not A)
             |_ Department 1.2.1.X.Y Role B

Role A and B are of the same class. Inheritance of roles outside of this class should not be impacted.

Is there any built-in way to configure the roles and classes in a way to inherit only the most-specific direct assignment?

Regards, 
  Thomas