A new phase of replacing the hardwired permisisons mode.

Referencing #641.
Merge pull request #50 from claudius108/master

A new phase of replacing the hardwired permisisons mode