Implementation of authorization rules (work in progress).