mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-06-11 11:03:23 +02:00
Added: IsBusy
This commit is contained in:
@ -113,6 +113,22 @@ namespace FabAccessAPI
|
||||
return writeCap.Use();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to get a GiveBack capability for a machine.
|
||||
/// </summary>
|
||||
/// <returns>Capability to give back the machine or null</returns>
|
||||
/// <exception cref="UnauthorizedException"></exception>
|
||||
public Task<Schema.Machine.WriteInterface.IGiveBack> GetGiveBack()
|
||||
{
|
||||
var writeCap = _machine.Write;
|
||||
if (writeCap == null)
|
||||
{
|
||||
throw new UnauthorizedException();
|
||||
}
|
||||
|
||||
return writeCap.GetGiveBack();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to reserve a machine. Throws a UnauthorizedException if the user does not have the required
|
||||
/// permissions to use this machine.
|
||||
|
Submodule FabAccessAPI/schema updated: 4adb053417...2dc488d13b
Reference in New Issue
Block a user