Moved test shared link to permissions test class and fixed to unset session when share is toggled off