-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a reg-lock verification action to the new console #2467
Conversation
friendly ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 9 of 9 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gbrodman)
core/src/main/java/google/registry/ui/server/console/ConsoleRegistryLockVerifyAction.java
line 55 at r1 (raw file):
domainLockUtils.verifyVerificationCode(lockVerificationCode, user.getUserRoles().isAdmin()); // TODO: send to a custom console landing page, but for now just redirect back to the console String url = String.format("%s/%s", consoleApiParams.request().getServerName(), "console");
First of all servername is not needed as console ui is hosted on the same server, so relative url is more preferable.
Apart from that I suggest not to use an url to direct console, but better keep simple JSON contract and allow front-end to do the thing and navigate where it needs upon receiving the response, this way API doesn't need to know about paths on front-end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry I totally forgot to click publish on my comment
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gbrodman)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ptkach)
core/src/main/java/google/registry/ui/server/console/ConsoleRegistryLockVerifyAction.java
line 55 at r1 (raw file):
Previously, ptkach (Pavlo Tkach) wrote…
First of all servername is not needed as console ui is hosted on the same server, so relative url is more preferable.
Apart from that I suggest not to use an url to direct console, but better keep simple JSON contract and allow front-end to do the thing and navigate where it needs upon receiving the response, this way API doesn't need to know about paths on front-end
This action is not called via a JSON request; is not an API. This action is triggered by the user clicking a link in an email, meaning that they're just opening up a fresh link in a new tab.
62587e4
to
349a885
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 5 of 9 files reviewed, 1 unresolved discussion (waiting on @ptkach)
core/src/main/java/google/registry/ui/server/console/ConsoleRegistryLockVerifyAction.java
line 55 at r1 (raw file):
Previously, gbrodman wrote…
This action is not called via a JSON request; is not an API. This action is triggered by the user clicking a link in an email, meaning that they're just opening up a fresh link in a new tab.
Ehhhh, I think I get what you were saying and I think this new way (what I'm pretty sure you were suggesting) is better. The front end will have a page that the email will link to, and that page will call this JSON API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 5 of 9 files reviewed, 1 unresolved discussion (waiting on @ptkach)
core/src/main/java/google/registry/ui/server/console/ConsoleRegistryLockVerifyAction.java
line 55 at r1 (raw file):
Previously, gbrodman wrote…
Ehhhh, I think I get what you were saying and I think this new way (what I'm pretty sure you were suggesting) is better. The front end will have a page that the email will link to, and that page will call this JSON API.
to be more clear, I think what I have now implemented is what you were suggesting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gbrodman and @jianglai)
core/src/main/java/google/registry/ui/server/console/ConsoleRegistryLockAction.java
line 159 at r2 (raw file):
.setScheme("https") .setHost(consoleApiParams.request().getServerName()) .setPath("/console/registry-lock-verify")
We use hash routing system in console ui, so most routes look like /console/#/{route_name}
core/src/main/java/google/registry/ui/server/console/ConsoleRegistryLockVerifyAction.java
line 55 at r1 (raw file):
Previously, gbrodman wrote…
to be more clear, I think what I have now implemented is what you were suggesting.
That's exactly what I meant, sorry if I didn't make it clear. I believe this is better than sending a redirect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jianglai and @ptkach)
core/src/main/java/google/registry/ui/server/console/ConsoleRegistryLockAction.java
line 159 at r2 (raw file):
Previously, ptkach (Pavlo Tkach) wrote…
We use hash routing system in console ui, so most routes look like /console/#/{route_name}
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jianglai)
The front end will have a (hidden) page that passes the verification code to this API endpoint and displays the result.
The front end will have a (hidden) page that passes the verification
code to this API endpoint and displays the result.
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)