finish user permission and delete galleries