[Pull] Version Check before try to Login #147

Closed
opened 2020-06-03 17:06:23 +00:00 by 6543 · 24 comments
Member

Original Pull att :https://gitea.com/gitnex/GitNex/pulls/147

Merged with: d14ecd9c68

--- Original Pull att :https://gitea.com/gitnex/GitNex/pulls/147 Merged with: d14ecd9c6893398a8f9a3edd325fdd9ab4179ca7
6543 added this to the 2.3.0 milestone 2020-06-03 17:06:23 +00:00
6543 added the
🎯 Enhancement
label 2020-06-03 17:06:23 +00:00
6543 closed this issue 2020-06-03 17:06:23 +00:00
6543 self-assigned this 2020-06-03 17:07:03 +00:00
Owner

I will be removing the version call from About screen in the future, it will be part of Accounts table. But that's for later.

Yes, it does not need token.

I will be removing the version call from About screen in the future, it will be part of Accounts table. But that's for later. Yes, it does not need token.
Owner

@6543 I am planning to release 2.2.0 tomorrow, will you be able to finish it by then?

Otherwise we can push it to the next release.

@6543 I am planning to release 2.2.0 tomorrow, will you be able to finish it by then? Otherwise we can push it to the next release.
Author
Member

@mmarif I'll have time on the weekend ...

@mmarif I'll have time on the weekend ...
Author
Member

@mmarif when you have an guilty login at witch point i get the first api calls?

@mmarif when you have an guilty login at witch point i get the first api calls?
Author
Member

@mmarif we schould use merge+squash to have a smaler git repo in long therme?

@mmarif we schould use merge+squash to have a smaler git repo in long therme?
Owner

when you have an guilty login at witch point i get the first api calls?

All the magic happen inside login() function which call letTheUserIn() API call function.
But for version check, it should happen before the actual API login call. Once the user tap the login button, 1st thing we check and show the error about the version. If all good, proceed to the next step. So in login() you can do the check and return with error when version is old.

we schould use merge+squash to have a smaler git repo in long therme?

Yes, we should to make the repo compact.

> when you have an guilty login at witch point i get the first api calls? All the magic happen inside `login()` function which call `letTheUserIn()` API call function. But for version check, it should happen before the actual API login call. Once the user tap the login button, 1st thing we check and show the error about the version. If all good, proceed to the next step. So in `login()` you can do the check and return with error when version is old. > we schould use merge+squash to have a smaler git repo in long therme? Yes, we should to make the repo compact.
Author
Member

last commit shows the function i get this error: https://pastebin.com/ZXj0tYUG

... working to get RetrofitClient send a syncron call

last commit shows the function i get this error: https://pastebin.com/ZXj0tYUG ... working to get RetrofitClient send a syncron call
Owner

I haven't check the code yet. But if the api call is outside, you can put it inside lettheuserin call.

I haven't check the code yet. But if the api call is outside, you can put it inside lettheuserin call.
Owner

If it is done from your side, I can take it from here to make it work.

If it is done from your side, I can take it from here to make it work.
Author
Member

Ok I'll improve VersionTest and then I let you try to bring it to live ... if i didnt found a solution untill then ;)

Ok I'll improve VersionTest and then I let you try to bring it to live ... if i didnt found a solution untill then ;)
Author
Member

@mmarif Its yours ;)

VersionTest works as it should now

@mmarif Its yours ;) VersionTest works as it should now
Owner

@6543 Thanks, I will take it from here.

@6543 Thanks, I will take it from here.
Owner

@6543 it's done. You can check from your side now. After your testing can merge.

@6543 it's done. You can check from your side now. After your testing can merge.
Author
Member

Great thanks!

Great thanks!
Author
Member

nice works fine!!

nice works fine!!
Author
Member

you ony catch the UNSUPPORTED_OLD but i think this is fine for the purpose of this PR ...

should we cleanup strings of unused one or leave it for later usage ?

you ony catch the UNSUPPORTED_OLD but i think this is fine for the purpose of this PR ... should we cleanup strings of unused one or leave it for later usage ?
Owner

Yes, we only need unsupported old. We can keep the strinngs as is for later use.

Yes, we only need unsupported old. We can keep the strinngs as is for later use.
Author
Member

I'll make a smal cleanup ...

I'll make a smal cleanup ...
Owner

Ok, I will wait for it.

Ok, I will wait for it.
Author
Member

OK I have looked throu and cleanup is not nessesary but i had two changes - if they are ok for you then we can merge :)

OK I have looked throu and cleanup is not nessesary but i had two changes - if they are ok for you then we can merge :)
Author
Member

@mmarif can yu squath-merge ?

@mmarif can yu squath-merge ?
Owner

@6543 Ok, I will squash.

New Gitea version detected! Please UPDATE GitNex!, how we know what version of GitNex user have to tell them to update?
We only check for Gitea versions.

Maybe I am missing something here, can you tell how it will work?

@6543 Ok, I will squash. `New Gitea version detected! Please UPDATE GitNex!`, how we know what version of GitNex user have to tell them to update? We only check for Gitea versions. Maybe I am missing something here, can you tell how it will work?
Owner

So if I am on gitea.com, I will be seeing that message. Am I right?

So if I am on gitea.com, I will be seeing that message. Am I right?
Author
Member

for others to read: answer: no ;)

for others to read: answer: no ;)
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitnex/GitNex#147
No description provided.