Permissions system improvements

Issue #477 resolved
Marcin Kuzminski
repo owner created an issue