mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Decouple superuser from SessionMetadata
Superuser should only be settable via the tool (see [] which is merged in here but not diffbased, and which removes the implicit superuser for CharlestonRoad). It is a property of the request, not of the session (there are no sessions in the tool). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=125204707
This commit is contained in:
parent
e359ab5f52
commit
fd6c4888db
44 changed files with 80 additions and 136 deletions
|
@ -55,6 +55,7 @@ public final class EppController {
|
|||
SessionMetadata sessionMetadata,
|
||||
TransportCredentials credentials,
|
||||
boolean isDryRun,
|
||||
boolean isSuperuser,
|
||||
byte[] inputXmlBytes) {
|
||||
Trid trid = null;
|
||||
try {
|
||||
|
@ -63,7 +64,7 @@ public final class EppController {
|
|||
ImmutableList<String> targetIds = eppInput.getTargetIds();
|
||||
metrics.setCommandName(eppInput.getCommandName());
|
||||
metrics.setClientId(sessionMetadata.getClientId());
|
||||
metrics.setPrivilegeLevel(sessionMetadata.isSuperuser() ? "SUPERUSER" : "NORMAL");
|
||||
metrics.setPrivilegeLevel(isSuperuser ? "SUPERUSER" : "NORMAL");
|
||||
if (!targetIds.isEmpty()) {
|
||||
metrics.setEppTarget(Joiner.on(",").join(targetIds));
|
||||
}
|
||||
|
@ -74,6 +75,7 @@ public final class EppController {
|
|||
sessionMetadata,
|
||||
credentials,
|
||||
isDryRun,
|
||||
isSuperuser,
|
||||
inputXmlBytes,
|
||||
metrics,
|
||||
clock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue