show-queue accessible to users

Let non-admin users be able to run the show-queue command. If
this command is invoked by a non-admin users, a smaller set of
data will be displayed.
This commit is contained in:
lincoln
2010-04-30 12:00:03 -03:00
committed by Ulrik Sjölin
parent b86025692a
commit 5f0fdf49f8
7 changed files with 194 additions and 13 deletions

View File

@@ -58,12 +58,22 @@ public abstract class AbstractGitCommand extends BaseCommand {
Context ctx = context.subContext(newSession(), context.getCommandLine());
final Context old = SshScope.set(ctx);
try {
startThread(new CommandRunnable() {
startThread(new ProjectCommandRunnable() {
@Override
public void executeParseCommand() throws Exception {
parseCommandLine();
}
@Override
public void run() throws Exception {
parseCommandLine();
AbstractGitCommand.this.service();
}
@Override
public Project.NameKey getProjectName() {
Project project = projectControl.getProjectState().getProject();
return project.getNameKey();
}
});
} finally {
SshScope.set(old);