Skip to content

Commit

Permalink
Deprecated pki user command
Browse files Browse the repository at this point in the history
The pki user command has been replaced with pki <subsystem>-user,
so it has been deprecated by adding a deprecated ProxyUserCLI
class.

https://pagure.io/dogtagpki/issue/2536

Change-Id: Ida1123620d99e9237cb55d380eaded4deba78a27
  • Loading branch information
edewata committed Mar 15, 2018
1 parent 156f188 commit 96df98a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
import com.netscape.cmstools.system.SecurityDomainCLI;
import com.netscape.cmstools.tks.TKSCLI;
import com.netscape.cmstools.tps.TPSCLI;
import com.netscape.cmstools.user.UserCLI;
import com.netscape.cmstools.user.ProxyUserCLI;
import com.netscape.cmsutil.crypto.CryptoUtil;
import com.netscape.cmsutil.crypto.CryptoUtil.SSLVersion;

Expand Down Expand Up @@ -106,7 +106,7 @@ public MainCLI() throws Exception {
addModule(new ProxyCLI(new GroupCLI(this), "ca"));
addModule(new ProxyCLI(new KeyCLI(this), "kra"));
addModule(new ProxyCLI(new SecurityDomainCLI(this), "ca"));
addModule(new ProxyCLI(new UserCLI(this), "ca"));
addModule(new ProxyUserCLI(this));

addModule(new CACLI(this));
addModule(new KRACLI(this));
Expand Down
38 changes: 38 additions & 0 deletions base/java-tools/src/com/netscape/cmstools/user/ProxyUserCLI.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// --- BEGIN COPYRIGHT BLOCK ---
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// (C) 2018 Red Hat, Inc.
// All rights reserved.
// --- END COPYRIGHT BLOCK ---

package com.netscape.cmstools.user;

import com.netscape.cmstools.cli.CLI;
import com.netscape.cmstools.cli.ProxyCLI;

/**
* @deprecated pki user has been deprecated. Use pki &lt;subsystem&gt;-user instead.
*/
@Deprecated
public class ProxyUserCLI extends ProxyCLI {

public ProxyUserCLI(CLI parent) {
super(new UserCLI(parent), "ca");
}

public void execute(String[] args) throws Exception {
System.err.println("WARNING: pki user has been deprecated. Use pki <subsystem>-user instead.");
super.execute(args);
}
}

0 comments on commit 96df98a

Please sign in to comment.