-
Notifications
You must be signed in to change notification settings - Fork 272
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 user email prefix to the console user create #2623
Conversation
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 11 of 11 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @ptkach)
console-webapp/src/app/users/users.service.ts
line 63 at r1 (raw file):
} createOrAddNewUser(maybeExistingUser: User) {
nit, but can rename this field to remove "maybe"
core/src/main/java/google/registry/ui/server/console/ConsoleUsersAction.java
line 149 at r1 (raw file):
private void runPostInTransaction() throws IOException { validateRequestParams(); if (tm().loadByKeyIfPresent(VKey.create(User.class, this.userData.get().emailAddress))
can just use tm().exists
right?
core/src/main/java/google/registry/ui/server/console/ConsoleUsersAction.java
line 201 at r1 (raw file):
String newEmailPrefix = userData.get().emailAddress.trim(); if (newEmailPrefix.length() != 3 || !newEmailPrefix.matches("^\\p{Alnum}+$")) {
what's this prefix regex?
core/src/main/java/google/registry/ui/server/console/ConsoleUsersAction.java
line 270 at r1 (raw file):
private User verifyUserExists(String email) { return tm().loadByKeyIfPresent(VKey.create(User.class, email))
same here w/r/t exists
11ff9aa
to
5df6e96
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: 8 of 12 files reviewed, 4 unresolved discussions (waiting on @gbrodman)
core/src/main/java/google/registry/ui/server/console/ConsoleUsersAction.java
line 149 at r1 (raw file):
Previously, gbrodman wrote…
can just use
tm().exists
right?
Right
core/src/main/java/google/registry/ui/server/console/ConsoleUsersAction.java
line 201 at r1 (raw file):
Previously, gbrodman wrote…
what's this prefix regex?
It's a way to match any alphanumeric caracters, including cyrillic. After giving it some more thoughts I've updated it.
core/src/main/java/google/registry/ui/server/console/ConsoleUsersAction.java
line 270 at r1 (raw file):
Previously, gbrodman wrote…
same here w/r/t
exists
Unlike the other one before, this one actually should stay as it is. Exists wouldn't fit here, because we want to return the user or throw
5df6e96
to
71545d9
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.
Reviewed 4 of 4 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ptkach)
core/src/main/java/google/registry/ui/server/console/ConsoleUsersAction.java
line 270 at r1 (raw file):
Previously, ptkach (Pavlo Tkach) wrote…
Unlike the other one before, this one actually should stay as it is. Exists wouldn't fit here, because we want to return the user or throw
oof yeah sorry
console-webapp/src/app/shared/services/backend.service.ts
line 196 at r2 (raw file):
catchError((err) => this.errorCatcher<User>(err, { emailAddress: '[email protected]',
heh i think this snuck in
console-webapp/src/app/shared/services/backend.service.ts
line 166 at r3 (raw file):
return this.http .get<User[]>(`/console-api/users?registrarId=${registrarId}`) .pipe(
i think these snuck in from testing?
71545d9
to
9ee40d8
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.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @ptkach)
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: complete! all files reviewed, all discussions resolved (waiting on @ptkach)
console-webapp/src/app/shared/services/backend.service.ts
line 196 at r2 (raw file):
Previously, gbrodman wrote…
heh i think this snuck in
Yep
console-webapp/src/app/shared/services/backend.service.ts
line 166 at r3 (raw file):
Previously, gbrodman wrote…
i think these snuck in from testing?
Yep
9ee40d8
to
c73b1e6
Compare
This change is