mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Add the ability to setup OT&E from the web console
We create a new endpoint with a simple form that will let admins (including support) setup OT&E for registrars. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=226570568
This commit is contained in:
parent
040319a95d
commit
2777018d6a
17 changed files with 804 additions and 34 deletions
|
@ -14,6 +14,7 @@
|
|||
|
||||
package google.registry.model.common;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
import static google.registry.model.ofy.ObjectifyService.allocateId;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
|
||||
|
@ -24,6 +25,7 @@ import com.googlecode.objectify.annotation.Id;
|
|||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.annotations.NotBackedUp;
|
||||
import google.registry.model.annotations.NotBackedUp.Reason;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A helper class to convert email addresses to GAE user ids. It does so by persisting a User
|
||||
|
@ -46,8 +48,9 @@ public class GaeUserIdConverter extends ImmutableObject {
|
|||
public static String convertEmailAddressToGaeUserId(String emailAddress) {
|
||||
final GaeUserIdConverter gaeUserIdConverter = new GaeUserIdConverter();
|
||||
gaeUserIdConverter.id = allocateId();
|
||||
gaeUserIdConverter.user =
|
||||
new User(emailAddress, Splitter.on('@').splitToList(emailAddress).get(1));
|
||||
List<String> emailParts = Splitter.on('@').splitToList(emailAddress);
|
||||
checkState(emailParts.size() == 2, "'%s' is not a valid email address", emailAddress);
|
||||
gaeUserIdConverter.user = new User(emailAddress, emailParts.get(1));
|
||||
|
||||
try {
|
||||
// Perform these operations in a transactionless context to avoid enlisting in some outer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue