add permission checking
add snippet button to page tree