An in-place editing directive for AngularJS with permission checks