81 Commits

Author SHA1 Message Date
Jaime van Kessel
b7ee3298c2
Add extra logging to auth server 2021-07-23 10:40:30 +02:00
Jaime van Kessel
c800c2850c
Decrease update interval to 60 sec
It's the same as what the rest uses and it should decrease the load on our servers a lot
2021-04-30 10:51:15 +02:00
Kostas Karmas
72080a3cca Delete the auth data on upgrade from 4.8 if the scope doesn't match
If the user account scope is outdated, delete it when upgrading from 4.8 to 4.9. This means that
the user will have to log in again, to make sure they get the correct account scope.

CURA-8093
2021-04-08 12:46:52 +02:00
Kostas Karmas
43615a57b6 Change client scope in the Account
CURA-7868
2020-12-18 14:34:29 +01:00
Nino van Hooff
979407eddf Additional typing fixes
CURA-7473
2020-06-29 11:10:50 +02:00
Nino van Hooff
8e62a6d6d7
Apply suggestions from code review
Typing suggestions by Jaime

CURA-7473

Co-authored-by: Jaime van Kessel <nallath@gmail.com>
2020-06-29 10:35:49 +02:00
Nino van Hooff
294afdb7ca Connect sync timer to sync() for consistency and add unit tests.
Also rename a function to camelCase

CURA-7473
2020-06-26 16:09:33 +02:00
Nino van Hooff
4f1a18f102 Add Install Pending Updates button to Account popup
CURA-7473
2020-06-26 11:37:01 +02:00
Jaime van Kessel
f6e9bc7c3c
Merge branch 'master' of github.com:Ultimaker/Cura into CURA-7418-update-profile-window 2020-06-15 14:10:20 +02:00
Jaime van Kessel
d33529f932
Use property & states instead of listening to changed signal
It makes a lot more sense to me to use states and an actual property.

CURA-7418
2020-06-11 17:31:19 +02:00
Nino van Hooff
1024879f9d Process Review feedback for CURA-7438
Renames UltimakerCloudAuthentication to UltimakerCloudConstants

Cura-7438
2020-06-09 13:41:30 +02:00
Jaime van Kessel
fd2a7689cc
Remove overly spammy logging 2020-06-04 14:32:37 +02:00
Nino van Hooff
58ffc9dcae Merge remote-tracking branch 'origin/master' into doxygen_to_restructuredtext_comments
# Conflicts:
#	cura/API/__init__.py
#	cura/Settings/CuraContainerRegistry.py
#	cura/Settings/ExtruderManager.py
#	plugins/PostProcessingPlugin/scripts/PauseAtHeight.py
#	plugins/UM3NetworkPrinting/src/Cloud/CloudApiClient.py
#	plugins/UM3NetworkPrinting/src/Cloud/ToolPathUploader.py
#	plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDeviceManager.py
2020-05-28 17:31:24 +02:00
Jaime van Kessel
280d3f07a6
Merge branch 'CURA-7290_manual_account_sync' of github.com:Ultimaker/Cura 2020-05-26 11:52:14 +02:00
Kostas Karmas
fad02193ab Fix sync button not appearing when opening popup after clicking away
This was achieved by adding an IDLE state, which is the default state
when opening the account management popup. The state is now reseted
when the popup opens instead of when it closes. In addition, now either
the "You are in sync with your account" label or the "Check account for
updates" button will appear in the popup based on the state, not both.

Finally, with theses changes, if the popup is open and an autosync
occurs, the user will be informed that the account is synced and he/she
will have to close and reopen the popup in order to trigger a manual
update.

CURA-7290
2020-05-26 09:49:58 +02:00
Nino van Hooff
7388829fc1 Change account sync date format back to dd/mm/YYYY
For consistency with the rest of the application
2020-05-19 14:32:02 +02:00
Nino van Hooff
23c039a873
Add type hint in cura/API/Account.py
Co-authored-by: Jaime van Kessel <nallath@gmail.com>
2020-05-19 14:14:39 +02:00
Nino van Hooff
050878bbfe
Update cura/API/Account.py
Co-authored-by: Jaime van Kessel <nallath@gmail.com>
2020-05-19 14:14:10 +02:00
Nino van Hooff
c6e6c76962 Merge remote-tracking branch 'origin/master' into doxygen_to_restructuredtext_comments
# Conflicts:
#	cura/API/Account.py
#	plugins/SimulationView/SimulationView.py
2020-05-15 13:38:37 +02:00
Nino van Hooff
94f094380b Log sync state transitions
CURA-7290
2020-05-15 11:59:22 +02:00
Nino van Hooff
a9692e3d27 Refactor setManualSyncEnabled
CURA-7290
2020-05-14 15:15:16 +02:00
Nino van Hooff
59b40c72f0 Additional scenarios for enabling/disabling the manual sync button
CURA-7290
2020-05-13 17:32:57 +02:00
Nino van Hooff
f78fa884c1 Only show the manual sync button after the account popup was closed
CURA-7290
2020-05-13 17:19:20 +02:00
Nino van Hooff
de0ef8ae62 Change account sync date format to mm/dd/YYYY
CURA-7290
2020-05-13 16:15:29 +02:00
Nino van Hooff
f34e05ac03
Merge pull request #7743 from Ultimaker/CURA-7427_Add_option_to_sign_in_with_different_account_while_waiting_for_printers
Cura 7427 add option to sign in with different account while waiting for printers
2020-05-12 17:39:07 +02:00
Kostas Karmas
eac4d3e463 Make login parametrized with a force_logout boolean
Instead of using a separate function to force logging out before
login, login now has a boolean parameter that instructs it to logout
before loging in again, if the user is alread logged in. It then
starts the authorization with a force browser logout first.

CURA-7427
2020-05-12 16:54:41 +02:00
Nino van Hooff
b40b8e8489 Merge remote-tracking branch 'origin/master' into CURA-7290_manual_account_sync
# Conflicts:
#	cura/API/Account.py
2020-05-12 14:59:01 +02:00
Nino van Hooff
3ca703f00c Merge remote-tracking branch 'origin/CURA-7290_manual_account_sync' into CURA-7290_manual_account_sync 2020-05-12 14:19:51 +02:00
Nino van Hooff
903c251f34 Additional account sync documentation
CURA-7290
2020-05-12 14:19:36 +02:00
Jaime van Kessel
6af502088e
Fix typing issue
CURA-7290
2020-05-12 13:25:36 +02:00
Kostas Karmas
96387ef2aa Add tests for loginWithForcedLogout() in account
CURA-7427
2020-05-12 13:06:47 +02:00
Nino van Hooff
3e1b695c43 Add some missing account sync timer logic
CURA-7290
2020-05-12 11:55:50 +02:00
Nino van Hooff
8e75da552d Do not inherit SyncState from QObject
not necessary and fixes mypy warning

CURA-7290
2020-05-12 11:23:14 +02:00
Kostas Karmas
b717755f20 Add "Sign in with another account" button in AddCloudPrintersView
There are cases where Cura and the browser fall out of sync when it
comes to accounts. In such cases, you may be logged in cura with an
account that has no cloud printers and in the browser with an account
that has printers. So when you press the "Add cloud printer" button,
you are redirected to mycloud and you see cloud printers that are not
detected by Cura (because Cura is in a different acconut). In such
cases, the user can now press the "Sign in with a different account"
link in the "Waiting for cloud response" page, which will log him/her
out in Cura AND in the browser, and then reinitiate the whole
authorization flow, to make sure the accounts are in sync.

CURA-7427
2020-05-11 17:47:09 +02:00
Nino van Hooff
176919eee0 Merge branch 'master' into doxygen_to_restructuredtext_comments
# Conflicts:
#	plugins/CuraEngineBackend/CuraEngineBackend.py
#	plugins/CuraEngineBackend/StartSliceJob.py
2020-05-08 15:31:23 +02:00
Nino van Hooff
1ae050bbc5 Expose Account.SyncState as an Enum to QML
Provides a single source of truth

CURA-7290
2020-05-08 11:09:48 +02:00
Nino van Hooff
8937c63219 Finish merge of auto sync packages
CURA-7290
2020-05-06 16:08:47 +02:00
Nino van Hooff
9b79b70f2b Merge branch 'CURA-7290_auto_sync_packages' into CURA-7290_manual_account_sync
# Conflicts:
#	cura/API/Account.py
#	plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py
2020-05-06 16:03:37 +02:00
Nino van Hooff
ef6cf8d5cc Remove unused pyqtProperty
CURA-7290
2020-05-06 12:08:55 +02:00
Nino van Hooff
7322526791 Fix typing warning
CURA-7290
2020-05-04 17:30:32 +02:00
Nino van Hooff
eac884fcd2 Convert SYNC_STATES to Enum
CURA-7290
2020-05-04 17:26:38 +02:00
Nino van Hooff
88ff68e40c Also check for package updates automatically
Moves the 30-second sync timer from CloudOutputDeviceManager to
Account and subscribes CloudPackageChecker to the timer.

CURA-7290
2020-05-04 16:56:09 +02:00
Nino van Hooff
637a241d99 Use single qml file for sync states
CURA-7290
2020-05-04 15:13:38 +02:00
Nino van Hooff
049c1946d4 Create Account sync state interface to allow for multiple sync services
Needed to add the package sync

CURA-7290
2020-05-04 13:52:40 +02:00
Nino van Hooff
81d02d5d58 Implement printer cloud sync error state
CURA-7290
2020-05-04 13:19:16 +02:00
Nino van Hooff
4e7f446fe1 Account sync: create additional sync states
CURA-7290
2020-05-04 11:26:20 +02:00
Nino van Hooff
4b88247af8 Account sync: remove debug info
CURA-7290
2020-05-01 17:49:40 +02:00
Nino van Hooff
acf36d1e42 Add Account sync last update datetime
CURA-7290
2020-05-01 17:44:58 +02:00
Nino van Hooff
0aed6d3731 Connect the manual sync button
CURA-7290
2020-05-01 15:56:09 +02:00
Nino van Hooff
828e931f52 Add manual sync button (non-functional)
CURA-7290
2020-04-30 17:19:14 +02:00