gitiles redirect to login page?

1,015 views
Skip to first unread message

Peter Bruin

unread,
Jul 1, 2019, 11:31:04 PM7/1/19
to Repo and Gerrit Discussion
Hi,
I would like to send users, not daily Gerrit users, a link with some markdown document. However if the user is not logged into to Gerrit they get an error 404.

I saw this changeset that seems to be designed to address the issue.
Using the latest 3.0.1 release plus the gitiles plugin from the master build it improves. Now I see the following message: 

Cannot parse URL as a Gitiles URL


But there is a header and a login link, using this link will in the end result in the correct page.

Would it not be better if:
  1. The user will be redirected to the login page? 
  2. The message would be asking the user to log in instead of telling him that there is something wrong with the URL
And, could this change be ported to the stable-3.0 branch?

Thanks,
Peter


David Pursehouse

unread,
Jul 1, 2019, 11:42:37 PM7/1/19
to Peter Bruin, Repo and Gerrit Discussion
On Tue, Jul 2, 2019 at 12:31 PM Peter Bruin <peterb...@gmail.com> wrote:
Hi,
I would like to send users, not daily Gerrit users, a link with some markdown document. However if the user is not logged into to Gerrit they get an error 404.

I saw this changeset that seems to be designed to address the issue.
Using the latest 3.0.1 release plus the gitiles plugin from the master build it improves. Now I see the following message: 

Be aware that by using the master build of gitiles you may run into unexpected behavior due to mismatches between dependencies.
 

Cannot parse URL as a Gitiles URL


But there is a header and a login link, using this link will in the end result in the correct page.

Would it not be better if:
  1. The user will be redirected to the login page? 
  2. The message would be asking the user to log in instead of telling him that there is something wrong with the URL
And, could this change be ported to the stable-3.0 branch?


It might be possible.  We'd also probably need to backport core gitiles changes to its stable-0.2 branch.

 
Thanks,
Peter


--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/e0f9f45f-394b-4122-8d65-332a985784f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Bruin

unread,
Jul 2, 2019, 12:50:53 AM7/2/19
to Repo and Gerrit Discussion

On Tuesday, 2 July 2019 11:42:37 UTC+8, David Pursehouse wrote:
On Tue, Jul 2, 2019 at 12:31 PM Peter Bruin <peterb...@gmail.com> wrote:
Hi,
I would like to send users, not daily Gerrit users, a link with some markdown document. However if the user is not logged into to Gerrit they get an error 404.

I saw this changeset that seems to be designed to address the issue.
Using the latest 3.0.1 release plus the gitiles plugin from the master build it improves. Now I see the following message: 

Be aware that by using the master build of gitiles you may run into unexpected behavior due to mismatches between dependencies.
Thanks, I will revert to using the bundled version of gitiles 3.0.1 
 

Cannot parse URL as a Gitiles URL


But there is a header and a login link, using this link will in the end result in the correct page.

Would it not be better if:
  1. The user will be redirected to the login page? 
  2. The message would be asking the user to log in instead of telling him that there is something wrong with the URL
And, could this change be ported to the stable-3.0 branch?


It might be possible.  We'd also probably need to backport core gitiles changes to its stable-0.2 branch.

That would be great, this would make it a lot easier for less tech savvy users to read the markdown docs in the repositories. Hope to see this in 3.0.2


 
Thanks,
Peter


--
--
To unsubscribe, email repo-d...@googlegroups.com

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-d...@googlegroups.com.

Alon Bar-Lev

unread,
Jul 2, 2019, 1:24:03 AM7/2/19
to Peter Bruin, Repo and Gerrit Discussion
Hi,

The behavior that was improved in master gitiles/gerrit-plugin is to
have the login option in top level menu also if there is gitiles
error, this enables user to login which was broken since many versions
of gitiles.

However, gitiles errors are not well formatted, these are nested deep
in code, if there is no permission for repository it assumes there is
a parsing error as it does not handle the reasoning correctly, I tried
to add some other cases but then always find other places that should
be fixed so I gave up. If we want to complete the user experience we
should invest more resources in this.

David, do you want me to backport the changes?

Regards,
Alon
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/be5397de-7ef0-4371-95bb-f57b088fef5c%40googlegroups.com.

David Pursehouse

unread,
Jul 2, 2019, 2:56:34 AM7/2/19
to Alon Bar-Lev, Peter Bruin, Repo and Gerrit Discussion
On Tue, 2 Jul 2019, 14:24 Alon Bar-Lev, <alon....@gmail.com> wrote:
Hi,

The behavior that was improved in master gitiles/gerrit-plugin is to
have the login option in top level menu also if there is gitiles
error, this enables user to login which was broken since many versions
of gitiles.

However, gitiles errors are not well formatted, these are nested deep
in code, if there is no permission for repository it assumes there is
a parsing error as it does not handle the reasoning correctly, I tried
to add some other cases but then always find other places that should
be fixed so I gave up. If we want to complete the user experience we
should invest more resources in this.

David, do you want me to backport the changes?

If you have time to do it, that would be great, thanks. 

Reply all
Reply to author
Forward
0 new messages