Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
huerni committed Nov 20, 2024
1 parent d744600 commit e4a4a44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/CraneCtld/AccountManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "AccountManager.h"

#include "AccountMetaContainer.h"
#include "crane/Lock.h"
#include "crane/PasswordEntry.h"

namespace Ctld {
Expand Down
4 changes: 2 additions & 2 deletions src/CraneCtld/TaskScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1275,9 +1275,9 @@ crane::grpc::CancelTaskReply TaskScheduler::CancelPendingOrRunningTask(

CRANE_TRACE("Cancelling running task #{}", task_id);

auto result = g_account_manager->CheckIfUidHasPermOnUser(
auto result = g_account_manager->HasPermissionToUser(
operator_uid, task->Username(), false);
if (!result) {
if (!result.ok) {
reply.add_not_cancelled_tasks(task_id);
reply.add_not_cancelled_reasons("Permission Denied.");
} else {
Expand Down

0 comments on commit e4a4a44

Please sign in to comment.