1
0
Fork 0
Commit Graph

98 Commits

Author SHA1 Message Date
Felix Weilbach 8376b99ec5 Allow to compile without QWebEngine
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-06-24 15:43:51 +00:00
Camila 98cfc362f7 Remove const and reference of base types.
Signed-off-by: Camila <hello@camila.codes>
2021-04-08 07:10:58 +00:00
Camila d9a0778e52
Add UserStatus enum with the pre defined status.
- User QHash to map status strings and Status enum.

Signed-off-by: Camila <hello@camila.codes>
2021-03-24 15:41:31 +01:00
Camila 974e2fb718
Do not display notifications when user status is do not disturb.
- This information is retrieved from the notifications endpoint.
- Add icons for the different pre defined status.
- Make functions available to QML to decide which status icon to display.
- Display the user status icon on the avatar and
move the online/offline connection status to the folder icon.

Signed-off-by: Camila <hello@camila.codes>
2021-03-24 15:40:05 +01:00
Kevin Ottens 0d3459e85e Introduce an empty auth type
This is necessary to be able to distinguish between "I decided on basic
by default" and "I didn't write any auth type". To make sure all the
jobs end up writing something we then implement the "I decided on basic
by default" in the slots connected to the job and we assert it in
checkAllDone()

Signed-off-by: Kevin Ottens <kevin.ottens@enioka.com>
2021-03-15 09:38:15 +00:00
Kevin Ottens 7ad0208800 Finish cleaning up shibboleth
There were a couple of shibboleth related enums left, since that auth
method isn't supported anymore remove the code tied to those enums. It
was dead code anyway.

Signed-off-by: Kevin Ottens <kevin.ottens@enioka.com>
2021-03-15 09:38:15 +00:00
Hannah von Reth 9d9eadba8e
Use time the request was send,..
not when it was processed by the client, to determine the quality of the connection.
2020-12-15 11:01:08 +01:00
Hannah von Reth b6e8d47644
Use Q_ENUM on AuthType to get the name printed in the log 2020-12-15 10:59:04 +01:00
Dominik Schmidt 92f6d866e1
Add missing OWNCLOUDSYNC_EXPORT 2020-12-15 10:58:52 +01:00
Christian Kamm 0e9f030b0f
RequestEtagJob: Consistently parse etags #7271
Previously RequestEtagJob did return the etag verbatim (including extra
quotes) while the db had the parsed form. That caused the etag
comparison during discovery move detection to always fail. The test
didn't catch it because the etags there didn't have quotes.

Now:
- RequestEtagJob will parse the etag, leading to a consistent format
- Tests have etags with quotes, detecting the problem
2020-12-15 10:58:52 +01:00
Christian Kamm f502a526fa
Generalize Result<> class, add Optional<>
To make it nicer to use outside of HTTP results.
2020-12-15 10:58:24 +01:00
Olivier Goffart 059f722b3b
Move Result to its own header 2020-12-15 10:58:08 +01:00
Olivier Goffart bdd1e72dda
New discovery algoritmh: more on Renames 2020-12-15 10:57:58 +01:00
Kevin Ottens 01f5501ad8 Allow to pass extraHeaders to a path based MkColJob
We could specify the extra headers with a URL but not a simple path.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-07-09 16:22:54 +02:00
asemmar d5587e386c fixed bad spelling of word 'retreive' except in sqlite dependancy
Signed-off-by: asemmar <anis.semmar@itron.com>
2020-07-06 09:46:14 +02:00
Michael Schuster 9447a10716
JsonApiJob: Add method usePOST to allow anonymous POST requests
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-01-18 15:03:21 +01:00
Roeland Jago Douma 363e62f8fa Fall back to old login flow on GS as this is not yet ready
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-12-06 21:03:01 +01:00
Michael Schuster 12f2ea6728
Login Flow V2: remove static test url
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-08-26 20:03:15 +02:00
Michael Schuster 2742411abd
Login Flow V2: 1st test-implementation
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-08-26 20:03:15 +02:00
J-P Nurmi 1af9bf8abc libsync: run clang-tidy modernize-use-nullptr 2018-11-12 18:46:39 +01:00
J-P Nurmi 0d1c15a768 libsync: run clang-tidy modernize-use-override 2018-11-12 18:43:58 +01:00
J-P Nurmi 48acaec66f libsync: search'n'replace "Q_DECL_OVERRIDE" with "override" 2018-11-12 18:39:50 +01:00
Roeland Jago Douma c763a6e7fb
Show webview with page
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-02 22:50:48 +02:00
Tomaz Canabrava 7432d6a814 Merge branch 'master' into clientSideEncryptionV4 2018-04-10 16:18:58 +02:00
Camila San 621596f45a
Saves notifications ETag response header to use to request only new notifications.
Signed-off-by: Camila San <hello@camila.codes>
2018-03-01 22:19:04 +01:00
Roeland Jago Douma 56028759d5
Merge branch 'master' into clientSideEncryptionV3 2017-12-14 20:47:05 +01:00
Tomaz Canabrava 33b1fcfe66 Merge branch 'master' into clientSideEncryptionV3 2017-12-12 10:46:43 +01:00
Olivier Goffart 74672d493d Utility: use QUrlQuery
For QUrl::setQuery is deprecated in Qt5
2017-12-08 16:15:17 +01:00
Olivier Goffart ed5385faa3 Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libsync/connectionvalidator.cpp
     	src/libsync/networkjobs.cpp
2017-12-05 15:58:13 +01:00
Tomaz Canabrava 2cacf2547e Merge branch 'master' into clientSideEncryptionV3 2017-11-28 20:12:57 +01:00
Olivier Goffart 753d7addb4 libsync: Fix compilation with TOKEN_AUTH_ONLY
This means we cannot use QtGui in libsync.
So this mostly disable the avatar from the account and the avatarjob

Note that there is one logic change: in ConnectionValidator::slotUserFetched
we do the avatar job even if the user is empty. Otherwise we would end up in
a invalid state. This restore the 2.3.x behavior that was broken in
commit e05d6bfcdc
2017-11-25 12:57:16 +01:00
Christian Kamm e9907bc8ae AvatarJob improvements
* Drop AvatarJob2
* Allow AvatarJob to retrieve different sizes and users
* Make creating a circular avatar into a function
  (maybe all avatars should be made into that shape in the first place)
2017-11-21 16:33:03 +01:00
Christian Kamm d949ec6877 Protocol: Introduce context menu with "open in browser" #6121
To do this conveniently a bunch of functionality that's common to
IssueWidget and ProtocolWidget is moved to ProtocolItem.

Also the convenience function to asynchronously retrieve the private
link url is moved from the socket api to the network jobs.
2017-11-21 12:42:10 +01:00
Tomaz Canabrava 6d464d9dc6 Merge branch 'master-nextcloud' into clientSideEncryptionV3 2017-11-20 18:00:58 +01:00
Christian Kamm 3ae2071129 DetermineAuth: Remove concept of Unknown #6148
This restores 2.3 behavior. Some servers reply 404 to GETs and PROPFINDs
to the remote.php/webdav/ url and used to work. Being more picky would
break them.
2017-11-14 12:10:35 +01:00
Christian Kamm 9af6e29f42 DetermineAuthType: Adjustments for tight firewalls #6135
With some firewalls we can't GET /remote.php/webdav/. Here we keep the
GET request to detect shibboleth through the redirect pattern but then
use PROPFIND to figure out the http auth method.

Currently we prefer OAuth to Shibboleth to Basic auth.

This also restores the fallback behavior of assuming basic auth
when no auth type can be determined.
2017-11-06 13:09:10 +01:00
Tomaz Canabrava 23f5bb7ed9 [CSE] Move network jobs out of networkjobs.h
Since those networkjobs are all about client side
encryption, mvoe them to clientsideencryption.h
This will help with fewer conflicts with the origin.
2017-10-23 21:06:26 +02:00
Tomaz Canabrava e0988f482c
[CSE] Build fix
- change the name of one Qt Message Handler
- changed parameter from int to QString
2017-10-18 21:51:39 +02:00
Tomaz Canabrava d83e8819ce
[CSE] SetEncryptionFlagApiJob
This new job sets the Encryption Flag in a folder.
2017-10-18 21:51:39 +02:00
Tomaz Canabrava cfb6e3be8c
[CSE] Send the Private Key to the server 2017-10-18 21:51:38 +02:00
Tomaz Canabrava 304231811d
[cse] Start the job to sign the public key. 2017-10-18 21:51:37 +02:00
Tomaz Canabrava 5b51346e83
[CSE] New Network Job: DeleteApiJob
This network job does a DELETE http request on a URL. It's the
second class that does basically the same, but this one returns
the http return code, and it's set to do a api call.
2017-10-18 21:51:36 +02:00
Tomaz Canabrava 9870f39dcb
[CSE] Fetch file-id for subfolders
File id is a must if we want to call any API.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2017-10-18 21:51:36 +02:00
Christian Kamm ce51ea34b9
OAuth: Use redirectable jobs for oauth token management 2017-10-05 22:01:32 +02:00
Christian Kamm b810ce7768
Update server url in case of permanent redirection #5972
This is the first time the account url may update outside of
account setup.

Summary of redirection handling:
1. During account setup (wizard)
   - status.php gets permanently redirected -> adjust url
   - authed PROPFIND gets *any* redirection -> adjust url
2. During connectivity ping (ConnectionValidator)
   - status.php gets permanently redirected -> adjust url (new!)

All other redirections should be followed transparently and
don't update the account url in the settings.
2017-10-05 22:01:05 +02:00
Christian Kamm 1c0d80c20d
Use DetermineAuthTypeJob in HttpCredentials
* Move it to networkjobs
* Minor adjustments to its logic
* Fixes redirect handling for oauth/basic http auth check #6003
2017-10-05 22:01:05 +02:00
Christian Kamm 7d075cdcb7 OAuth: Use redirectable jobs for oauth token management 2017-09-15 09:28:03 +02:00
Christian Kamm 09173fb727 Update server url in case of permanent redirection #5972
This is the first time the account url may update outside of
account setup.

Summary of redirection handling:
1. During account setup (wizard)
   - status.php gets permanently redirected -> adjust url
   - authed PROPFIND gets *any* redirection -> adjust url
2. During connectivity ping (ConnectionValidator)
   - status.php gets permanently redirected -> adjust url (new!)

All other redirections should be followed transparently and
don't update the account url in the settings.
2017-09-11 19:27:36 +02:00
Christian Kamm de5de6284c Use DetermineAuthTypeJob in HttpCredentials
* Move it to networkjobs
* Minor adjustments to its logic
* Fixes redirect handling for oauth/basic http auth check #6003
2017-09-11 19:15:43 +02:00
Christian Kamm c8d0f788e0 Apply clang-format 2017-05-17 12:26:27 +02:00