Restricting file-sharing and other feature permissions by IP range


Is it possible to configure permission such that users with IP range X may only share files and video chat with other users within IP range X but not within IP range Y or Z? All internal users and would be the on-prem edition of MM.

If not by IP, then would this work according to an attribute pulled from AD or another internal system?

Beyond file sharing, it would be ideal to also apply the same business rules to screen sharing. Any thoughts on this would also be great.

I cannot see anything in the documentation for this specifically. If this is not possible now with MM, what is the best strategy to implement this - fork MM, create a plugin or extension or something else?