mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Change @Auth to an AutoValue, and created a set of predefined Auths
We want to be safer and more explicit about the authentication needed by the many actions that exist. As such, we make the 'auth' parameter required in @Action (so it's always clear who can run a specific action) and we replace the @Auth with an enum so that only pre-approved configurations that are aptly named and documented can be used. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=162210306
This commit is contained in:
parent
5966d8077b
commit
e224a67eda
94 changed files with 614 additions and 511 deletions
|
@ -37,6 +37,7 @@ import google.registry.model.domain.DomainResource;
|
|||
import google.registry.model.registry.Registry.TldType;
|
||||
import google.registry.request.Action;
|
||||
import google.registry.request.Response;
|
||||
import google.registry.request.auth.Auth;
|
||||
import google.registry.util.FormattingLogger;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
@ -52,7 +53,11 @@ import org.joda.time.DateTime;
|
|||
* Each TLD's active domain names are exported as a newline-delimited flat text file with the name
|
||||
* TLD.txt into the domain-lists bucket. Note that this overwrites the files in place.
|
||||
*/
|
||||
@Action(path = "/_dr/task/exportDomainLists", method = POST)
|
||||
@Action(
|
||||
path = "/_dr/task/exportDomainLists",
|
||||
method = POST,
|
||||
auth = Auth.AUTH_INTERNAL_ONLY
|
||||
)
|
||||
public class ExportDomainListsAction implements Runnable {
|
||||
|
||||
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue