Merge branch 'stable-2.6'
* stable-2.6: Fix ls-user-refs command name in documentation Mark project and user options as required for LsUserRefs Fix setting account's full name via ssh TrivialRebase: tidy up docstrings to follow PEP-0257 Change-Id: Ibd4563a8418e823d700082bc4fbcf465085d4719
This commit is contained in:
@@ -58,11 +58,11 @@ public class LsUserRefs extends SshCommand {
|
||||
private ChangeCache changeCache;
|
||||
|
||||
@Option(name = "--project", aliases = {"-p"}, metaVar = "PROJECT",
|
||||
usage = "project for which the refs should be listed")
|
||||
required = true, usage = "project for which the refs should be listed")
|
||||
private ProjectControl projectControl;
|
||||
|
||||
@Option(name = "--user", aliases = {"-u"}, metaVar = "USER",
|
||||
usage = "user for which the groups should be listed")
|
||||
required = true, usage = "user for which the groups should be listed")
|
||||
private String userName;
|
||||
|
||||
@Option(name = "--only-refs-heads", usage = "list only refs under refs/heads")
|
||||
@@ -73,10 +73,6 @@ public class LsUserRefs extends SshCommand {
|
||||
|
||||
@Override
|
||||
protected void run() throws Failure {
|
||||
if (userName == null || projectControl == null) {
|
||||
throw new UnloggedFailure(1, "fatal: --user and --project options must be used.");
|
||||
}
|
||||
|
||||
Account userAccount = null;
|
||||
try {
|
||||
userAccount = accountResolver.find(userName);
|
||||
|
@@ -147,6 +147,7 @@ final class SetAccountCommand extends BaseCommand {
|
||||
if (fullName != null) {
|
||||
if (realm.allowsEdit(FieldName.FULL_NAME)) {
|
||||
account.setFullName(fullName);
|
||||
accountUpdated = true;
|
||||
} else {
|
||||
throw new UnloggedFailure(1, "The realm doesn't allow editing names");
|
||||
}
|
||||
|
Reference in New Issue
Block a user