Change auth settings on some tools service actions

This brings the affected actions into line with the settings on other similar actions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157259842
This commit is contained in:
mountford 2017-05-26 13:58:58 -07:00 committed by Ben McIlwain
parent e46937beac
commit bc63d80a5e
6 changed files with 40 additions and 9 deletions

View file

@ -25,6 +25,8 @@ import google.registry.model.EppResourceUtils;
import google.registry.model.domain.DomainResource;
import google.registry.request.Action;
import google.registry.request.Response;
import google.registry.request.auth.Auth;
import google.registry.request.auth.AuthLevel;
import google.registry.util.FormattingLogger;
import javax.inject.Inject;
import org.joda.time.DateTime;
@ -37,7 +39,15 @@ import org.joda.time.DateTimeZone;
* run internally, or by pretending to be internal by setting the X-AppEngine-QueueName header,
* which only admin users can do.
*/
@Action(path = "/_dr/task/refreshAllDomains")
@Action(
path = "/_dr/task/refreshAllDomains",
auth =
@Auth(
methods = {Auth.AuthMethod.INTERNAL, Auth.AuthMethod.API},
minimumLevel = AuthLevel.APP,
userPolicy = Auth.UserPolicy.ADMIN
)
)
public class RefreshAllDomainsAction implements Runnable {
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();