Support arbitrary number of permission lists.
Merge pull request #1140 from martyanov/features/improve-permission-control

Support arbitrary number of permission lists