Skip to content

Commit

Permalink
CODENY-367 fix openWelcomePage required parameter name (#1037)
Browse files Browse the repository at this point in the history
Signed-off-by: Max Shaposhnik <mshaposhnik@codenvy.com>
  • Loading branch information
mshaposhnik committed Apr 14, 2016
1 parent d2f6883 commit ac01f2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ public class FactoryConstants {
public static final String INVALID_FIND_REPLACE_ACTION = "The findReplace action requires 'in', " +
"'find' and 'replace' properties to be set.";

public static final String INVALID_WELCOME_PAGE_ACTION = "The openWelcomePage action requires 'nonAuthenticatedContentUrl', " +
"'authenticatedContentUrl' properties to be set.";
public static final String INVALID_WELCOME_PAGE_ACTION = "The openWelcomePage action requires 'greetingContentUrl' property to be set.";

public static final String ILLEGAL_REQUIRE_AUTHENTICATION_FOR_NAMED_WORKSPACE_MESSAGE =
"This factory was improperly configured. The parameter 'workspace.type=named' requires 'policies.requireAuthentication=true'.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,7 @@ protected void validateProjectActions(Factory factory) throws BadRequestExceptio
if (onAppLoaded != null) {
for (Action action : onAppLoaded.getActions()) {
final Map<String, String> properties = action.getProperties();
if ("openWelcomePage".equals(action.getId()) && (isNullOrEmpty(properties.get("nonAuthenticatedContentUrl")) ||
isNullOrEmpty(properties.get("authenticatedContentUrl")))) {

if ("openWelcomePage".equals(action.getId()) && isNullOrEmpty(properties.get("greetingContentUrl"))) {
throw new BadRequestException(FactoryConstants.INVALID_WELCOME_PAGE_ACTION);
}
}
Expand Down

0 comments on commit ac01f2b

Please sign in to comment.