Skip to content

Commit

Permalink
Make call from
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-ians committed Nov 14, 2024
1 parent 52cf0f6 commit b5ba290
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
3 changes: 1 addition & 2 deletions core/src/org/labkey/core/admin/AdminController.java
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,7 @@ public static void registerAdminConsoleLinks()
AdminConsole.addLink(Configuration, "system maintenance", new ActionURL(ConfigureSystemMaintenanceAction.class, root));
AdminConsole.addLink(Configuration, "external redirect hosts", new ActionURL(ExternalHostsAdminAction.class, root).addParameter("type", ExternalServerType.Redirect.name()), TroubleshooterPermission.class);
AdminConsole.addLink(Configuration, "external allowed sources", new ActionURL(ExternalHostsAdminAction.class, root).addParameter("type", ExternalServerType.Source.name()), TroubleshooterPermission.class);
if (ModuleLoader.getInstance().hasModule("Premium"))
AdminConsole.addLink(Configuration, "allowed file extensions", new ActionURL(ExternalHostsAdminAction.class, root).addParameter("type", ExternalServerType.FileExtension.name()), TroubleshooterPermission.class);
AdminConsole.addLink(Configuration, "allowed file extensions", new ActionURL(ExternalHostsAdminAction.class, root).addParameter("type", ExternalServerType.FileExtension.name()), TroubleshooterPermission.class);

// Diagnostics
AdminConsole.addLink(Diagnostics, "actions", new ActionURL(ActionsAction.class, root));
Expand Down
19 changes: 19 additions & 0 deletions core/src/org/labkey/core/admin/ExternalServerType.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ public HtmlString getTitle()
{
return HtmlString.of(String.format("External %1$s Host", name()));
}

@Override
public HtmlString getLabel()
{
return HtmlString.of("Host");
}
},
Redirect {
@Override
Expand Down Expand Up @@ -100,6 +106,12 @@ public HtmlString getTitle()
{
return HtmlString.of(String.format("External %1$s Host", name()));
}

@Override
public HtmlString getLabel()
{
return HtmlString.of("Host");
}
},
FileExtension {
@Override
Expand Down Expand Up @@ -145,6 +157,12 @@ public HtmlString getTitle()
{
return HtmlString.of("Allowed File Extension");
}

@Override
public HtmlString getLabel()
{
return HtmlString.of("Extension");
}
};

private static final AuthorityValidator AUTHORITY_VALIDATOR = new AuthorityValidator(UrlValidator.ALLOW_LOCAL_URLS);
Expand All @@ -158,6 +176,7 @@ public static String getExternalSourceHostsKey()
public abstract List<String> getHosts();
public abstract void setHosts(Collection<String> redirectHosts);
public abstract HtmlString getTitle();
public abstract HtmlString getLabel();


public String getHelpTopic()
Expand Down
2 changes: 1 addition & 1 deletion core/src/org/labkey/core/admin/addNewExternalHost.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<labkey:form method="post">
<table>
<tr>
<td class="labkey-form-label"><label for="newExternalHostTextField">Host</label></td>
<td class="labkey-form-label"><label for="newExternalHostTextField"><%=bean.getTypeEnum().getLabel()%></label></td>
<td><input name="newExternalHost" id="newExternalHostTextField" size="75" /></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion core/src/org/labkey/core/webdav/DavController.java
Original file line number Diff line number Diff line change
Expand Up @@ -3076,7 +3076,7 @@ public void closeInputStream() throws IOException
};
if (FileUtil.isAllowedFileName(name) != null)
{
throw new IOException("File extension not allowed.");
throw new IOException("The file extension is not allowed.");
}
AntiVirusService avs = AntiVirusService.get();

Expand Down

0 comments on commit b5ba290

Please sign in to comment.