finish permissions and update sidebar