Check edit permissions in angular for appropriate pages

Also improve error page.  Fixes #2850