public Device GetDeviceWithPermissions(int deviceId, IPrincipal user) { var account = user.GetCurrentUserAccount(_context.Accounts); return(GetDeviceWithPermissions(deviceId, account.Id)); }