Use ifCanEdit to toggle edit buttons