From dev-return-92588-apmail-cloudstack-dev-archive=cloudstack.apache.org@cloudstack.apache.org Fri Apr 22 13:22:07 2016 Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C85AB196A3 for ; Fri, 22 Apr 2016 13:22:07 +0000 (UTC) Received: (qmail 83785 invoked by uid 500); 22 Apr 2016 13:22:07 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 83729 invoked by uid 500); 22 Apr 2016 13:22:07 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 83718 invoked by uid 99); 22 Apr 2016 13:22:07 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Apr 2016 13:22:07 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C8068DFCDF; Fri, 22 Apr 2016 13:22:06 +0000 (UTC) From: jburwell To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request: CLOUDSTACK-8562: Dynamic Role-Based API C... Content-Type: text/plain Message-Id: <20160422132206.C8068DFCDF@git1-us-west.apache.org> Date: Fri, 22 Apr 2016 13:22:06 +0000 (UTC) Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1489#discussion_r60737225 --- Diff: plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LdapCreateAccountCmd.java --- @@ -119,6 +131,9 @@ private Long getDomainId() { @Override public void execute() throws ServerApiException { + if (getAccountType() == null && getRoleId() == null) { + throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Both account type and role ID are not provided"); --- End diff -- Why not mark these two parameters as required and let the framework perform the validation? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---