diff --git a/src/CraneCtld/AccountManager.cpp b/src/CraneCtld/AccountManager.cpp index cc7e277b..00cdd450 100644 --- a/src/CraneCtld/AccountManager.cpp +++ b/src/CraneCtld/AccountManager.cpp @@ -19,7 +19,6 @@ #include "AccountManager.h" #include "AccountMetaContainer.h" -#include "crane/Lock.h" #include "crane/PasswordEntry.h" namespace Ctld { diff --git a/src/CraneCtld/TaskScheduler.cpp b/src/CraneCtld/TaskScheduler.cpp index 63bdb6db..14a8a39e 100644 --- a/src/CraneCtld/TaskScheduler.cpp +++ b/src/CraneCtld/TaskScheduler.cpp @@ -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 {