#300 adding REST-role permissions to normal code

This is a fix for #300.