1
0
Fork 0
Commit Graph

2264 Commits

Author SHA1 Message Date
Camila San 8e0c036fc3
Aligns Network and General to the right.
Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:05:59 +02:00
Camila San 75c2613b1b
Displays activity and notification messages in the list view.
Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:05:59 +02:00
Camila San 908870ccde
Adds notifications to the Activities list.
Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:05:57 +02:00
Christian Kamm d549c77af6
Issues: Show link to conflicts doc if there are some #6396
The link url is themed.
2018-07-03 10:18:18 +02:00
Roeland Jago Douma 0d70b05b65
Set Accept-language header for webview requests
This way the server will properly translate it for you if it has
translations.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-07-03 07:45:02 +02:00
Camila Ayres 9627aad04c
Merge branch 'master' into fix/458/do_not_show_webview_by_default 2018-07-02 22:01:03 +02:00
Christian Kamm 70b5d54082
Proxy settings: Fix bad behavior with empty host
Fixes f6a075ef54 for #5885

When no host is given it shouldn't just *appear* that there is no
proxy, there actually shouldn't be a proxy set then.
2018-07-02 21:15:30 +02:00
Roeland Jago Douma 34d964fc80
Do not force to show the webview on construct
Should fix #458

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-07-02 20:09:30 +02:00
Roeland Jago Douma 08abc71acb
gui Q_UNUSED
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-07-02 13:02:15 +02:00
Camila San e69a9c61d0
Windows: moves translation files to /i18n.
Signed-off-by: Camila San <hello@camila.codes>
2018-06-26 23:56:34 +02:00
Roeland Jago Douma 9eb950bdcf
Merge pull request #438 from nextcloud/bugfix/413/hide-decrypt-option
Hide decrypt option since it does only work for empty folders
2018-06-23 21:20:46 +02:00
Julius Härtl 92480ec8fb
Hide decrypt option since it does only work for empty folders
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-22 12:13:04 +02:00
Julius Härtl e42f5648bd
Add indicator to e2e folders
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-22 11:21:30 +02:00
Julius Härtl 655a43db10
Use custom mnemonic dialog
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-22 10:42:01 +02:00
Roeland Jago Douma 48a6ef37b2
Add a button to E2E accounts to show the mnemonic
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-21 19:52:27 +02:00
Roeland Jago Douma 30b211381f
More fixes for the OSX daily builds
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-21 15:22:53 +02:00
Christian Kamm ca8f569371
SocketAPI: Remove SHARE_STATUS
It was never used by a shell integration.
2018-06-11 19:35:17 +02:00
Christian Kamm 2bec587d4d
SocketAPI: Allow opening share dialog if contents still syncing #4608
With the previous changes the "Share..." action was shown but it didn't
work yet.
2018-06-11 19:35:16 +02:00
Roeland Jago Douma dc41f8a16e Fix windows build
* Reorder openssl header import
* not => !

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-08 16:53:56 +02:00
Christian Kamm e65caee9cf
Notify if an explicitly excluded folder is created #6222 2018-06-08 14:49:26 +02:00
Christian Kamm a1d6af60f0
AccountWizard: Reserve space for error label #6546 2018-06-07 15:32:52 +02:00
Julius Härtl 689ab5b8b3
Merge branch 'master' into upstream/owncloudsynclog 2018-06-07 14:38:49 +02:00
Christian Kamm 797b40237e
Partial local discovery: Fix scheduling logic
A recent patch that touched the condition for deciding whether a
periodic full local discovery is necessary accidentally inverted the
condition.
2018-06-06 22:49:50 +02:00
Christian Kamm 898a530ba5
ShareLink: Preserve password when unrelated ui changes #6512 2018-06-06 20:56:34 +02:00
Olivier Goffart fbc1747168
Fix a bunch of warning with clang
The option -Wno-discarded-qualifiers only exists with GCC, clang warns that
it has no effects.

Also it warns when some virtual fuction are marked with override but not
all of them.
2018-06-06 20:31:14 +02:00
Christian Kamm e1ab5f3811
Network settings: If no proxy host given, show "no proxy" #5885
What happens internally is that a proxy without a hostname gets treated
as no proxy.
2018-06-06 20:11:09 +02:00
Olivier Goffart 073a5184cb
Use std::chrono::milliseconds to represent milliseconds 2018-06-06 17:26:53 +02:00
Olivier Goffart c4af4a5a85
More Button: Use SVG and fix size so it renders good in highdpi
When the more button was changed from using a text to an icon,
the size computation was not adjusted proerly to that of a button
with an icon.

And using svg allows it to be rendered correctly with high-dpi

It looks much much nicer now
2018-06-06 13:55:34 +02:00
Christian Kamm de9fb7dc9a
Silence warning by removing unnecessary this capture 2018-06-06 09:15:25 +02:00
Christian Kamm 550b845037
SocketApi/Sharing: Add "copy public link" to menu #6356
* The new menu option will fetch shares and create a new link share if
  no "context menu share" currently exists.
* Various cleanup of common operations in socketapi happened as well,
  in particular there's now FileData::get() that calculates all the
  relevant paths that are useful for most socketapi actions.
2018-06-06 09:15:23 +02:00
Markus Goetz eb097cbffb
Notifications: Lower hiding timeout
With the 4.5sec timeout, it was very easy to accidently hit the wrong notification
when the previous one dissapeared so late.
2018-06-05 21:24:56 +02:00
Markus Goetz de1032ebd7
Q_UNUSED: Sprinkle around 2018-06-05 20:45:51 +02:00
Markus Goetz d3cbe63801
macOS: Implement new dynamic Finder menu items #6328 2018-06-05 20:40:40 +02:00
Markus Goetz 648911f3ab
macOS: Unload the Finder extension on exit #5382 #3819 2018-06-05 20:22:02 +02:00
Christian Kamm 4a81ae75cf
Logging: Add persistent auto-logdir option #6442 2018-06-05 20:07:53 +02:00
Christian Kamm 9319b6594e
LogDir: Go to new file on Problem/Abort too #6442 2018-06-05 20:07:53 +02:00
Christian Kamm 63c2474b70
Folders: Use "Problem" icon for unresolved conflicts #6277 2018-06-05 19:59:19 +02:00
Christian Kamm ed5e413751
Share link: Update permission wording #6192 2018-06-05 19:46:04 +02:00
Olivier Goffart f4f228de3e
FolderStatusModel: fix potential assert
OCC::FolderStatusModel::slotUpdateDirectories: ASSERT: "parentInfo->_fetching" in file /home/olivier/kdegit/owncloud/mirall/src/gui/folderstatusmodel.cpp, line 599

This can happen if the structure of a folder is change while the user
expands the root folder. In this case, resetSubs() is called which
resets _fetching to false.
Instead, we need to keep a pointer to the job so we can abort it by
deleting it.
2018-06-05 08:12:58 +02:00
Roeland Jago Douma 32ae670c4e
Merge pull request #325 from nextcloud/upstream/ssl-button-speed
SslButton: Improve speed (especially on macOS) #6031
2018-06-04 17:14:38 +02:00
Roeland Jago Douma 3c3f3541d4
Merge pull request #291 from nextcloud/fixEncryptionDecryptionNonEmptyFolder
Forbid to encrypt or decrypt a non-empty folder.
2018-06-04 16:03:25 +02:00
Roeland Jago Douma c49597d9d8
Merge pull request #319 from nextcloud/upstream/issue/4424
Folder: normalize the local path.
2018-06-04 16:02:49 +02:00
Roeland Jago Douma 321e8c0264
Merge pull request #317 from nextcloud/upstream/issue/3146
SslButton: Add HTTP/2 info #3146
2018-06-04 16:01:44 +02:00
Tomaz Canabrava 9b74a596c6
Forbid to encrypt or decrypt a non-empty folder.
The specs forbid the encryption or decryption of a
non empty folder. so...
1 - check for the sync status, if it's not synced return

as there's no way that I can say that there's items on the
server right now without waiting for the sync to finish

2 - verify if the folder is empty locally

as the user could have send some files to the folder.
2018-06-04 15:33:01 +02:00
Markus Goetz ab34f36836
owncloudsynclog: 1 MB -> 10 MB #6420 2018-06-03 23:09:23 +02:00
Roeland Jago Douma 4b1c6bb833
Fix cloudproviders after merging #314
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-02 20:46:10 +02:00
Roeland Jago Douma 1262cbf4ef
Merge pull request #314 from nextcloud/upstream/pr/6373
Make sure ignored and conflict files show up in the issues tab even with partial local discovery
2018-06-02 20:20:19 +02:00
Julius Härtl c9634d65aa
Merge pull request #313 from nextcloud/upstream/pr/6380
ConnectionValidator: change the minimum server version
2018-06-01 15:43:19 +02:00
Markus Goetz b8b9b93a6e
ShareDialog: macOS grey odditiy #5774 2018-06-01 13:31:22 +02:00
Olivier Goffart 8484b493e4
ConnectionValidator: change the minimum server version
Forbit connection with server older than 7.0. These server did not have
permission.

Also warn for anything older than 9.1. 9.0 is end of life according to
https://github.com/owncloud/core/wiki/Maintenance-and-Release-Schedule
2018-06-01 13:17:11 +02:00
Olivier Goffart 1b587a1241
ConnectionValidator::Status use Q_ENUM
So no need to have a manual conversion to QString
This is only used in debug message anyway.
2018-05-31 21:56:55 +02:00
Olivier Goffart 311307e8cb
Move ClientProxy and ConnecitonValidator to gui
They are using the ConfigFile and are used to control
when to sync rather than for the sync itself
2018-05-31 21:56:55 +02:00
Olivier Goffart 9fe8713bdc
Folder: remove unused member 2018-05-31 21:56:44 +02:00
Markus Goetz 13b2e51dfe
Notifications: Immediately request when getting account online 2018-05-29 20:09:08 +02:00
Markus Goetz 00d8343e76
SettingsDialogMac: Also start timer for notifications 2018-05-29 20:09:06 +02:00
rakekniven 8d90c8c17b
Fixed tiny grammar issue 2018-05-20 11:17:46 +02:00
Julius Härtl 6a5654d6d2
Merge pull request #294 from nextcloud/upstream/pr/6330
SocketAPI: "Open in browser" and disable Share entries when sharing i…
2018-05-19 16:09:50 +02:00
Julius Härtl 9196ab1c98
Merge pull request #246 from k1l1/master
scary wording on big changes #216 (translations missing)
2018-05-19 15:44:04 +02:00
Kilian Pfeiffer bb65eb8cdd changed wording
https://github.com/nextcloud/client/issues/216
2018-05-19 13:17:25 +02:00
Julius Härtl b7a67863a7
Merge pull request #306 from nextcloud/upstream/pr/6347
Set launch-on-startup when the first account is set up
2018-05-18 16:08:52 +02:00
Julius Härtl 0283e1bfaa
Merge pull request #295 from nextcloud/upstream/pr/6329
Tray: Change icon for unresolved conflicts #6277
2018-05-18 08:53:49 +02:00
Roeland Jago Douma 3b4fcfcc65
Merge pull request #302 from nextcloud/upstream/pr/6352
Sharing: Use maximum allowed permissions for new share #6346
2018-05-17 21:11:33 +02:00
Roeland Jago Douma cbeb9af7fd
Merge pull request #296 from nextcloud/upstream/issue/6337
FolderStatusModel: Refresh folders on Problem sync #6337
2018-05-17 15:37:20 +02:00
Markus Goetz 9ef42b4835
SslButton: Improve speed (especially on macOS) #6031
From 1+n*450msec to 1*450msec
2018-05-16 21:03:06 +02:00
Olivier Goffart ad276a4bce
Folder: normalize the local path.
We otherwise normalize all path in the C form, so we must have
the Folder's path normalized the same. Or all comparizon will fail
(such as knowing if a file from the SocketAPI or the FilesystemWatcher
are part of the folder)

Issue #4424
2018-05-16 20:26:09 +02:00
Markus Goetz 434f093f98
SslButton: Add HTTP/2 info #3146 2018-05-16 20:10:51 +02:00
Christian Kamm 1868b2f3ec
IssuesWidget: addItem performance improvement
Ensure adding a new item isn't usually O(n) by keeping track of which
items have associated issues.
2018-05-16 16:49:41 +02:00
Christian Kamm a0d7095b2c
IssuesWidget: Don't allow two issues for the same file/folder
This is intended to safeguard against invalidation bugs that cause the
same error to be added again for every sync run.
2018-05-16 16:49:03 +02:00
Christian Kamm a0d5e31423
INSTRUCTION_IGNORE now carries a direction
This allows IssuesWidget to selectively wipe only the 'Up' ignores
during selective local discovery.
2018-05-16 16:48:31 +02:00
Christian Kamm 11b6b48c75
ProtocolItem: Adjust the way data is stored again
The struct makes it easy to pack data and should consume less memory
overall.
2018-05-16 16:48:06 +02:00
Christian Kamm 800f1ace0c
SyncResult: Make sure the number of conflicts is correct #6226
If the SyncResult incorrectly believes that there are no conflicts, the
tray icon won't be correct and there will be no warning about unresolved
conflicts on the account.

Nevertheless, it's pretty awkward that the IssuesWidget is better
informed about pending conflicts than the Folder itself. This kind of
backwards data flow is very confusing.

Unfortunately the only alternative I see is to either keep track of
this information in two places (also in Folder), or create a common
data-holding class that can serve as a model instance for the issues
view as well as provide data directly to the Folder - which would
have been a much larger change.
2018-05-16 16:47:27 +02:00
Christian Kamm 75194d1821
SyncEngine: Make "local discovery?" question available
Also fix the minor bug that was mentioned and add tests.
2018-05-16 16:46:40 +02:00
Christian Kamm 2defaf099d
Issues tab: Invalidate issues selectively #6226
Everything is invalidated later: after discovery, not before. In
addition entries that should only be invalidated when new local
discovery is done have that behavior now.
2018-05-16 16:45:39 +02:00
Christian Kamm 01f83ff398
ProgressInfo: Add information for local vs remote discovery 2018-05-16 16:45:13 +02:00
Christian Kamm 583399ad53
Set launch-on-startup when the first account is set up
The previous code would disable it when the second account was
configured.

See #6347
2018-05-15 22:59:16 +02:00
Christian Kamm 7154a001d6
Sharing: Use maximum allowed permissions for new share #6346
The client already computed the valid permissions, there was just a typo
that meant we didn't end up using them.
2018-05-15 19:26:40 +02:00
Olivier Goffart 88347a985f
Adjust the Move To Trash patch
(PR #6265)

 - Remove the UI completely
 - Move the #ifdef inside the FileSystem::moveToTrash function, so it is easier to
   implement on other platforms
 - Q_OS_UNIX includes mac, so we need to disable it. (not using Q_OS_LINUX because of
   other BSD that uses XDG spec as well
 - Translate the error messages
 - Add a couple of doc comments
2018-05-15 19:10:41 +02:00
Christian Kamm 1fa88c9820
FolderStatusModel: Refresh folders on Problem sync #6337
We don't want to refresh too frequently. But Problem is very close to
Success and very common.
2018-05-15 18:08:17 +02:00
Christian Kamm ad750f569c
Tray: Change icon for unresolved conflicts #6277 2018-05-15 17:58:10 +02:00
Olivier Goffart 2fcd7b20b8
SocketAPI: "Open in browser" and disable Share entries when sharing is disabled.
This adds "Open in browser" entry in the menu (Issue #5903)

Also mark the entries as disabled when the file is not yet on the server.
If re-sharing is not allowed for that file, a disabled explaination
entry is added to the menu.
If sharing is disabled globaly in the branding or in the server,
the share entry will not be present.
(Issues #4205 and #4608)

Meta issue #6292
2018-05-15 17:39:30 +02:00
Oleg Solovyov f9fe24feb9
Move remote-deleted files to trash
Squashed from https://github.com/owncloud/client/pull/6265

Linux only, Hidden option, disabled by default
2018-05-15 17:23:38 +02:00
Camila San d629f2259d
Changes from qCWarning to qCDebug.
Signed-off-by: Camila San <hello@camila.codes>
2018-05-07 18:19:29 +02:00
Camila San bbff83fe7c
Only updates the list of apps when there is a change in the server (not 304 status).
Signed-off-by: Camila San <hello@camila.codes>
2018-05-07 18:03:51 +02:00
Camila San 402dc6c33b
Checks for http status code before building navigation apps menu.
Signed-off-by: Camila San <hello@camila.codes>
2018-05-07 18:03:51 +02:00
Camila San 23a759ef4a
Adds 304 http status code as valid.
Signed-off-by: Camila San <hello@camila.codes>
2018-05-07 18:03:51 +02:00
Camila San 77ebccee72
Adds methods to set/get navigation apps etag response header.
Signed-off-by: Camila San <hello@camila.codes>
2018-05-07 18:03:51 +02:00
Camila San d7286872f6
Adds function to add raw header to the request.
Function added to be able to add If-None-Match to save the ETag.

Signed-off-by: Camila San <hello@camila.codes>
2018-05-07 18:03:42 +02:00
Roeland Jago Douma 889c930b36
Merge pull request #75 from nextcloud/new_flow
Add weblogin flow for NC > 12
2018-05-03 14:07:44 +02:00
Roeland Jago Douma 56e17c25b2
Change loading bar to NC blue
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-03 13:55:27 +02:00
Roeland Jago Douma ef2d113930
Mark credentials as valid if there is no error
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-02 22:50:48 +02:00
Roeland Jago Douma 35e8d0437d
Address comments
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-02 22:50:48 +02:00
Roeland Jago Douma 6809f12e68
Allow the user to sign in again
If the user is signed out (for whatever reason). Show a popup
with the loginflow again.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-02 22:50:48 +02:00
Roeland Jago Douma ac1664b525
Actually use webflow credentails
* Detect invalid auth (if the users token is removed for example)
* Properly store and fetch from keychain

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-02 22:50:48 +02:00
Roeland Jago Douma 6b43d80c01
Start with persisting credentials
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-02 22:50:48 +02:00
Roeland Jago Douma 356f9b4831
Actually connect properly to server
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-02 22:50:48 +02:00
Roeland Jago Douma 715c738ebf
Add urlschema handler so w can catch the nc:// urls
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-02 22:50:48 +02: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
Roeland Jago Douma c4a88fe57e
Add QWebView as a dependency
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-02 22:50:48 +02:00
Camila Ayres 9338dadaab
Merge pull request #265 from k1l1/log_files_path
Put log files somewhere else #221 (name conflict)
2018-05-02 15:30:34 +02:00
Kilian Pfeiffer 56c1d79c49 fixes windows crash / renaming changed 2018-04-30 16:09:04 +02:00
Camila Ayres 64cbc88474
Merge pull request #251 from nextcloud/clientSideEncryptionV4
Client side encryption v4.
2018-04-26 19:56:55 +02:00
Kilian Pfeiffer cd926e5b84 resolving name conflict in logfiles 2018-04-24 15:47:23 +02:00
Roeland Jago Douma 75609c1b2c
Merge pull request #254 from ad1rie1/FIX32BitApplication
Fix #6394
2018-04-22 20:57:36 +02:00
Adrien 5f0a021c04 Fix #6394 2018-04-19 11:35:03 +02:00
Kilian Pfeiffer 40b1f051a4 log files are visible now 2018-04-17 17:59:03 +02:00
Kilian Pfeiffer faf64958ec changed paths of logfiles 2018-04-17 15:54:05 +02:00
Tomaz Canabrava 7432d6a814 Merge branch 'master' into clientSideEncryptionV4 2018-04-10 16:18:58 +02:00
Tomaz Canabrava 11684682e6 Return empty metadata in case of error, Display error to the user. 2018-03-25 22:31:49 +02:00
Camila Ayres 08b33c6f4b
Merge pull request #197 from nextcloud/fix-notifications
Improves notifications:
- Display the actual response text from the notification API in the popups.
- Do not display sync activities messages like how many files were downloaded, only errors.
- Make the notifications section above the activity feed also clickable. e.g open the call, the file that was shared, open the calendar event etc
- Changes "Show desktop notifications" setting to "Show server notifications"
- Show notifications on startup and then show only NEW notifications: uses If-None-Match check to only retrieve notifications once there are new notifications.
2018-03-13 13:30:44 +01:00
Camila Ayres eb3b3f02a0
Merge pull request #195 from nextcloud/apps-external-sites-menu
Adds apps and external sites to menu.
2018-03-09 11:48:14 +01:00
Camila San 11d178ce1d
Adds absolute=true param to navigation/apps request.
Signed-off-by: Camila San <hello@camila.codes>
2018-03-03 23:11:11 +01:00
Camila San 3c778980df
Makes sure JsonApiJob::finished won't throw a JSON error when status code is 304.
Signed-off-by: Camila San <hello@camila.codes>
2018-03-03 22:24:16 +01: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
Camila San d42401e36a
Changes notifications api endpoint to v2.
Signed-off-by: Camila San <hello@camila.codes>
2018-03-01 15:20:36 +01:00
Camila San 6bf9f65fd3
Only notify users of new notifications and only shows them all on startup.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-27 23:05:18 +01:00
Camila San 56709f3cff
Removes string 'Created' from notifications time.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-26 12:56:02 +01:00
Camila San 112c5e10b6
Removes Server Activities option from General settings.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-26 12:02:34 +01:00
Camila San 09a92a518a
Align text and changes spacing in notification widget. 2018-02-26 00:03:29 +01:00
Camila San 0f9d8e15a0
Only uses 'More information' text in button for notification link.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-26 00:02:09 +01:00
Camila San 44f299eba2
Removes debug messages.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-26 00:00:42 +01:00
Camila San d71438f181
Adds host and scheme to activity link so it can be opened in the
browser.

- Removes debug messages.
- Removes Activity data _appName - not used anymore.

Signed-off-by: Camila San <hello@camila.codes>
2018-02-25 23:58:28 +01:00
Camila San 71f4760215
Do not display user account when there is only one user in popup message.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-25 23:57:44 +01:00
Camila San 4a6a8ca6c6
Removes _appName from Activity data.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-25 23:56:54 +01:00
Camila San 1a0edc1cd0
Sync activities notifications are never shown unless there is an error. Server activities and notifications are off by default.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-23 12:08:37 +01:00
Camila San 99d8d050c2
Compares account menu with the account associated with the action to make sure apps is added to the right position.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-22 20:10:22 +01:00
Camila San 4ffff7454e
Refactores code and displays nav. apps before Pause/Unpause folders sync.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-21 18:49:12 +01:00
Camila San 9acb30ecb2
Refactores code to fetch and display sub menu with list from navigation/apps endpoint.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-20 19:41:08 +01:00
Camila San 61062f9809
Adds ocsnavigationapps files to CMakeslists.txt.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-20 19:33:25 +01:00
Camila San fb080f08ec
Uses OcsNavigationAppsJob instead of OcsAppsJob and OcsExternalSitesJob in OwncloudGui.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-19 20:53:12 +01:00
Camila San c9bc20c63d
Creates navigation/apps API call class OcsNavigationAppsJob.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-19 20:51:56 +01:00
Camila San f107b3348c
Removes external sites/apps configuration from general settings.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-19 20:49:55 +01:00
Camila San 9f559c8e00
Retrieves list of apps and displays it if 'show apps' checkbox is checked in the settings.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-19 19:59:33 +01:00
Camila San bf77dbac73
Adds checkbox 'showApps' to the general settings form.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-19 19:59:33 +01:00
Camila San 8ada9d0471
List apps for each user in the tray main menu.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-19 19:59:33 +01:00
Camila San 08769b2803
Adds OcsAppsJob to retrieve apps enabled for the user.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-19 19:59:33 +01:00
Camila San 89d743396a
Fixes class name in comments and in ifndef.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-19 19:59:33 +01:00
Camila San 649f3ff904
Changes response parsing for the new request.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-19 19:59:32 +01:00
Camila San 9f0c154e68
Fixes request url - uses the one for all users.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-19 19:59:32 +01:00
Camila San f48a94ba71
Saves 'show external sites list' option to the config file.
Uses option to toggle display of external sites list in the main menu.

Signed-off-by: Camila San <hello@camila.codes>
2018-02-19 19:59:32 +01:00
Camila San ec428786ac
Adds checkbox to toggle display of external sites list in the menu.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-19 19:59:32 +01:00
Camila San 69f3468ec0
Lists external sites for each user in the main menu.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-19 19:59:32 +01:00
Camila San 8408851cee
Adds OCS External Sites Job to retrieve it from the server.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-19 19:59:19 +01:00
Camila San 32e29fb849
Doesn't open the file manager when there isn't a file associated with the Activity.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-16 19:17:22 +01:00
Camila San 20cf4ed642
Improves Notification Widget UI.
- Changes spacing.
- Removes QFrame.
- Changes icon size.

Signed-off-by: Camila San <hello@camila.codes>
2018-02-16 18:04:44 +01:00
Camila San ab7185a6c7
Changes notification text in the checkboxes and adds tooltips with explanation about it.
- Changes the configuration name in ConfigFile and GeneralSettings
accordingly with the new text.
- Makes sure the user sees error and conflict messages even if the
setting is disabled.

Signed-off-by: Camila San <hello@camila.codes>
2018-02-15 20:21:35 +01:00
Camila San bfc7aa16c6
Adds option to toggle display of Sync and Activity notifications.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-14 20:38:15 +01:00
Camila San b24751b099
Adds button to open notification in the browser - to update something, join a call, etc.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-14 19:22:08 +01:00
Camila San a7dd3a7da1
Displays the actual notification subject in the system tray messages.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-12 22:16:46 +01:00
Daniel Nicoletti 080c5ea678 Better explanation for encryption passphrase
FIXES: #149
2018-02-02 17:27:58 +01:00
Camila San 2545017819
Refactores code.
- Renames function from populateTableReadOnlyValues to setupTableReadOnlyItems.
- Use a const to define the number of read only rows.
- Removes enable/disable remove all button checks from where it was not
needed.

Signed-off-by: Camila San <hello@camila.codes>
2018-02-02 16:01:53 +01:00
Camila San 73b7540468
Enable/disable remove all button depending on the number of rows.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-02 15:50:17 +01:00
Camila San c29d3b7e0b
Adds button to remove all items from ignore list table.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-02 14:40:30 +01:00
Camila San 4855e3242c
Restores correctly default system values for ignore files list.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-02 14:15:45 +01:00
Camila San bf76b596af
Allows deletion of pre configured patterns in the ignore list.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-01 22:36:40 +01:00
Camila San 6dd349a8a6
Adds button to restore default patterns in the ignore list.
Signed-off-by: Camila San <hello@camila.codes>
2018-02-01 22:35:38 +01:00
Camila San f7697b0584
Enables removing patterns from ignored files list.
Signed-off-by: Camila San <hello@camila.codes>
2018-01-31 22:59:51 +01:00
Tomaz Canabrava dcc9ac7d2e [Buildfix] Fix build from last merge 2018-01-29 14:17:52 +01:00
Tomaz Canabrava d24a1e542e Merge branch 'master' into clientSideEncryptionV3 2018-01-29 14:06:12 +01:00
Julius Härtl bcb9553925
Use Qt5DBus_FOUND instead of the old WITH_DBUS
WITH_DBUS was removed in 257d8142b1

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-01-25 14:18:03 +01:00
Roeland Jago Douma 48bce4c6b0
Merge remote-tracking branch 'oc/master' into oc_up 2018-01-25 11:17:04 +01:00
Camila San 7a69e19e4d
Uses QString::number to get a string equivalent of the notification_id number.
This fixes the bug reported #117.

Signed-off-by: Camila San <hello@camila.codes>
2018-01-24 17:29:45 +01:00
Olivier Goffart 02988229b1 FolderStatusModel: don't use deprecated QModelIndex::child
Was deprecated in Qt 5.8.
(IMHO this show that child can be usefull and I am not sure the
deprecation was justified)
2018-01-24 10:23:03 +01:00
Olivier Goffart 72b9beb79c Merge remote-tracking branch 'origin/2.4'
Conflicts:
	shell_integration/nautilus/syncstate.py
2018-01-23 14:08:15 +01:00
Olivier Goffart 982c591ec9 SocketApi: add a way to disable menu entries 2018-01-23 14:02:56 +01:00
Olivier Goffart 1782ae3c08 SocketAPI: Make it easier to add or remove item in the action menu
By making it dynamic.
So far only the dolphin shell extension have been ported
2018-01-23 14:02:56 +01:00
Christian Kamm 59f2e0634e Protocol: Correct sorting by size #6326
Previously we were sorting by size string, where
"6 MB" < "3 KB".
2018-01-23 12:02:16 +01:00
Christian Kamm 32bb1e6763 ProtocolItem: Use accessors over magic numbers 2018-01-23 12:02:16 +01:00
Christian Kamm 497b327d43 ShareLinkWidget: Remove outdated signal connection
Also convert the others to the new syntax to avoid similar errors in the
future.
2018-01-23 12:01:22 +01:00
Christian Kamm d831369f86 Protocol: Remove entries for auto resolved conflicts #6316 2018-01-23 12:01:22 +01:00
Tomaz Canabrava cae6bbc853 [CSE] Start the download process 2018-01-22 14:08:32 +01:00
Tomaz Canabrava 4a2d0ab9e9 [CSE] Move code to display minemonic out of the libsync
The libsync should not contain Qt Widget related code.
2018-01-21 19:50:40 +01:00
Olivier Goffart 5a97ddde5a Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/gui/updater/updater.cpp
2018-01-19 13:41:29 +01:00
Christian Kamm a8a6f82270 Link shares: Change default share name #6298
There's a 64 character limit and we don't want to accidentally exceed
it.

Eventually there might be server API for default share name generation.

See owncloud/core#29913
2018-01-17 15:03:11 +01:00
Dominik Schmidt fe3c68b9dd Fix Linux icons 2018-01-17 12:18:31 +01:00
Olivier Goffart 2a14ba5582 Folder: remove declaration of non-existing method 2018-01-15 15:43:13 +01:00
Olivier Goffart 2a842a5745 Application: remove declaration of non-existing functions 2018-01-15 15:07:09 +01:00
Camila Ayres cd36f73f6b
Removes 'Log in to all accounts' and 'Log out to all accounts' from main menu.
This is not an often used option and it should be fine if this can only be done
from within the settings dialog.

Signed-off-by: Camila San <hello@camila.codes>
2018-01-15 11:48:27 +01:00
Jürgen Weigert a33fc2a0db Update updater.cpp
deprecate suffix nightly, promote suffix daily
2018-01-15 11:25:10 +01:00
Dominik Schmidt d8a279c671 Fix windows cross build of the updater and bump libcrashreporter-qt revision 2018-01-14 00:45:02 +01:00
Dominik Schmidt 6d56f30d9b Fix incorrect target_include_directories usage for crash reporter 2018-01-13 23:49:58 +01:00
Dominik Schmidt 81c20352e1 Use new ECMAddAppIcon macro for application icons.
cmake/modules/ECMAddAppIcon.cmake is heavily patched to support sidebar icons, OUTFILE_BASE parameter and to not include 64 and 64@2x icons on macOS which are not supported. All changes are made in a way that we can upstream this.
2018-01-13 13:58:17 +01:00
Dominik Schmidt 6ee87a77cc Fix macOS updater build without deprecated Qt apis 2018-01-13 13:58:17 +01:00
Dominik Schmidt 539d6fd92e Link client against QtMacExtras as it bundles qtmacgoodies 2018-01-13 13:58:17 +01:00
Olivier Goffart 3ae327ea8e Modernize out CMakeLists.txt
Mainly uses target_include_directories instead of include_directories
so libraries public include directory get automatically added when adding
the target in target_link_library
2018-01-13 13:58:17 +01:00
Olivier Goffart 257d8142b1 Build system: Get rid of QtVersionAbstraction.cmake
Use modern cmake with target_link_libraries and Qt5:: that
automatically add the include path and compile flags
2018-01-13 13:58:17 +01:00
Olivier Goffart 776bbbf7b1 Don't include sqlite3.h from headers
So that sqlite is not part of the public interface of csync
(and that the sqlite include path don't need to be passed when compiling
libsync or gui)
2018-01-13 13:58:17 +01:00
Olivier Goffart 9613f6437d Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libsync/networkjobs.cpp
2018-01-11 10:46:50 +01:00
Jürgen Weigert 9dc765142c
Update updater.cpp
depricate suffix nightly, promote suffix daily
2018-01-10 16:19:08 +01:00
Christian Kamm cdd8d10940 Fix resizing crash when currentPage() is null
Sentry:
https://sentry.io/owncloud/desktop-win-and-mac/issues/425331770/
2018-01-09 13:54:11 +01:00
Christian Kamm 86377aa37a Folder: Remove unused 'dirty proxy' setting 2018-01-05 09:44:20 +01:00
Christian Kamm 7aa9af08c3 Issues: Speed up insertion and add hard upper limit #6272
Since sorting was enabled permanenty the list would be resorted with
each inserted issue. When inserting thousands of ignored files that
would make the whole ui freeze up.

Instead, sorting is disabled for inserts now and is reenabled after some
time has passed. That way users usually see the sorted view without the
lockups. Also, there's now a maximum of 50k issue entries.
2018-01-05 08:44:27 +01:00
Christian Kamm ab9d6285c6 Proxy: Hostname validation and reconnection on setting change
Where 'validation' currently just means "check whether it's empty".

Code adapted from wiggiBe's original PR #6140
2018-01-04 14:30:24 +01:00
Daniel Nicoletti c6491d50bb Replace deprecated Qt API usage 2017-12-29 17:28:35 +01:00
Daniel Nicoletti a63d34f870 Prepend "nextcloud" for all logging categories
Thus making easier to exclude logging from kio, qt
and only enable "nextcloud.*"
2017-12-28 17:33:10 -02:00
Daniel Nicoletti c963259bfb Fix URL in dialog that requests password
An URL that had base like "http://localhost/nextcloud/"
would get the last slash '/' removed and then appended
with "index.php..." resulting in
http://localhost/nextcloudindex.php
2017-12-28 10:00:17 -02:00
Roeland Jago Douma 4551bbe0e0
Forget key + cert + mnemonic on account removal
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 15:35:23 +01:00
Tomaz Canabrava 23f832caf4 [CSE] Code Cleanup 2017-12-17 19:19:44 +01:00
Tomaz Canabrava 7ef2489f1d [CSE] Fix infoForFileId
We need to traverse the path recursivelly.
2017-12-17 19:14:34 +01:00
Tomaz Canabrava ce41e3e42f [CSE] Work the Set Decrypted Bit 2017-12-15 23:32:41 +01:00
Tomaz Canabrava 43332d3ac7 [CSE] Properly update UI status to encrypted / decrypted 2017-12-15 14:00:42 +01:00
Julius Härtl 49a16ffb4b
Fix build on windows
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-12-15 10:59:14 +01:00
Roeland Jago Douma 56028759d5
Merge branch 'master' into clientSideEncryptionV3 2017-12-14 20:47:05 +01:00
Tomaz Canabrava 82c07236c1 [CSE] Add new method "infoForFolderId"
we need to query the model for the subfolderinfo, but we don't
have the model index, we have the folder id. this returns it.
2017-12-14 14:39:07 +01:00
Julius Härtl 1cedb1919f
Integrate libcloudproviders support
This commit integrates support for libcloudproviders
desktop integration API. If build with the library it
will check on startup if the DBus interface is available
and then use it instead of the legacy status icon.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-12-14 11:19:25 +01:00
Roeland Jago Douma fe4bb52a6d
Merge remote-tracking branch 'oc/master' into oc_up 2017-12-14 10:27:11 +01:00
Christian Kamm f40cceaf04 Share link: Adjust design of folder sharing permissions #6192 2017-12-14 08:34:44 +01:00
Christian Kamm e5ed8fc90a Merge remote-tracking branch 'origin/2.4' 2017-12-13 11:03:24 +01:00
Markus Goetz 75676f8830 Notifications: Propagate "Dismiss" as DELETE to server #5922
(cherry picked from commit e86416fff7)
2017-12-13 11:00:40 +01:00
Tomaz Canabrava 2127b2629d [CSE] Move encryption related network jobs to its own file
Move encryption related network jobs to it's own file,
the original file was starting to be just way too big.
2017-12-12 19:36:47 +01:00
Olivier Goffart 02283fc686
Merge pull request #6224 from owncloud/deprecated
Remove use of deprecated Qt API
2017-12-12 11:48:04 +01:00
Tomaz Canabrava 33b1fcfe66 Merge branch 'master' into clientSideEncryptionV3 2017-12-12 10:46:43 +01:00
Olivier Goffart d517d92f6c FolderWizard: don't use deprecated API 2017-12-08 16:16:06 +01:00
Olivier Goffart 71dcf7fc37 SSLButton: Removes some call to deprecated functions 2017-12-08 16:16:02 +01:00
Olivier Goffart 0a59faf03d OcsJob: Use QUrlQuery
Qurl::setEncodedQueryItems is deprecated.
2017-12-08 16:15:48 +01:00
Olivier Goffart 8c652e061d Remove uses of deprecated QString::fromAscii 2017-12-08 16:15:48 +01:00
Olivier Goffart a4816d6a8c Updater: use QUrlQuery
QUrl::addQueryItem is deprecated
2017-12-08 16:15:47 +01:00
Olivier Goffart 1a503d54f6 Remove usage of deprecated qSort 2017-12-08 16:15:47 +01:00
Olivier Goffart 263668b1cb Remove use of deprecated translate call 2017-12-08 16:15:38 +01:00
Olivier Goffart 3df65460f5 Remove usage of QString::null
Replaces by "QString()"
2017-12-08 16:15:22 +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 4581d708ff Account: remove dependency with ConfigFile
Part of #6213
2017-12-07 17:39:16 +01:00
Olivier Goffart e0a14cac5b ConfigFile: use QStandardPaths::AppConfigLocation for the config file
Also use appName instead of appNameGui in order to compute the path

Issue: #2245

The reason is to respect the XDG spec on Unix (#1601) and might help
on windows roaming profiles (#684)
2017-12-07 17:39:16 +01:00
Olivier Goffart ac844a2a45 AbstractNetworkJob: move the httpTimeout from the propagator to the network job
Remove one dependency from the config file for the sync engine.
Part of issue #6213
2017-12-07 17:39:16 +01:00
Christian Kamm 7ab127ad53 Excludes: Refactor for pending improvements
Make ExcludedFiles something that is instantiated outside of
the CSYNC context and then given to it as a hook.

ExcludedFiles still lives in csync_exclude and the internal
workings haven't been touched.
2017-12-07 14:38:21 +01:00
Hefee 32f38dc5f8 fix typo error: occured-> occurred 2017-12-06 20:02:53 +01:00
Christian Kamm 79fe71db58 Hide selective sync buttons while disconnected #5809
The choices or big folder warnings will pop up again on reconnection.
2017-12-06 16:41:28 +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
Olivier Goffart ee98daf9ea Shibboleth: Upgrade to OAuth2 When the server supports it
If the server support both Shibboleth and OAuth2, upgrades to OAuth2

Issue #6198
2017-12-04 08:09:34 +01:00
Olivier Goffart 30e3932af8 FolderWizard: Fix minimum size
There are several bugs in QWizard that needs to be worked around for the minimum
size of the widget to take effect.

Issue #4280
2017-11-29 08:03:06 +01:00
Tomaz Canabrava 2cacf2547e Merge branch 'master' into clientSideEncryptionV3 2017-11-28 20:12:57 +01:00
Tomaz Canabrava 47b5cd0fbb [CSE] Shows correctly Encrypt / Decrypt in the menu 2017-11-27 21:19:54 +01:00
Tomaz Canabrava d2d2df4c75 [CSE] Try to find the webdav url of a folder. 2017-11-27 21:06:38 +01:00
Roeland Jago Douma ccd050455a
Merge pull request #62 from bceverly/master
Added build support for FreeBSD
2017-11-27 20:39:19 +01:00
Olivier Goffart b8444053b8 AccountSettings: Fix the size of the "Add Sync Folder Connection" button
The problem here is that the QPainter is created on the viewport with is a
QWidget, but QAbstractItemView can have a different font, and the
QStyleOptionViewItem::font is this font. QStyleOptionViewItem::font
was used to compute the sizeHint, and the default font from the QPainter
was used to draw the text, so they could be not in sync.

Fix it by always using the font for QPushButton

Reported in
https://github.com/owncloud/client/issues/6156#issuecomment-346576328
2017-11-25 16:07:06 +01:00
bceverly 51e355e403 Added support for FreeBSD 2017-11-24 08:54:24 -05:00
Tomaz Canabrava 45d9323653 [CSE] Update encryption status when folder is updated 2017-11-23 16:55:12 +01:00
Tomaz Canabrava 57e0d7abcb [CSE] Fix pointer to e2e
Qt expects things to be pointers even if they are stack
variables.
2017-11-23 16:54:45 +01:00
Christian Kamm 8c94601ef2 User shares: Further avatar tweaks 2017-11-21 16:33:03 +01:00
Christian Kamm f27ceb7fab User shares: Use background color, remove permission frame #6176 2017-11-21 16:33:03 +01:00
Christian Kamm 60bde048c6 User shares: Fix missing label when there are only link shares
The "not shared with users or groups" label only appeared if there were
no shares at all.
2017-11-21 16:33:03 +01:00
Christian Kamm 3b961204e1 Avatars in user share dialog: Minor tweaks 2017-11-21 16:33:03 +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
Roeland Jago Douma 6b9b5252de User shares: Show avatars
[Sharing] Show placeholders for avatars

Just like on the web show placeholders for avatars in the sharing dialog

[Sharing] Show avatars!

[Sharing] Show same avatar placeholder for group/federated shares as on
web
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
Roeland Jago Douma 462353d0ee
Have correct app password link
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-11-21 09:17:42 +01:00
Tomaz Canabrava d31aa7836a [CSE] Add job to find what folders are encrypted.
This still needs to be correctly setuped in the call chain.
The job returns a QVariantMap with the folder-webdav-url
and the encrypted status.
2017-11-20 21:38:17 +01:00
Tomaz Canabrava 6d464d9dc6 Merge branch 'master-nextcloud' into clientSideEncryptionV3 2017-11-20 18:00:58 +01:00
Olivier Goffart e7a91a1169 AccountSettings: Use the proper position to show the menu over sub-folder
The menu can be open with the keyboard shortcut.

(Fixup for the fix of #5596)

Also use popup instead of exec to show the menu: it's safer as it does
not re-enter the event loop.
2017-11-20 15:22:45 +01:00
Roeland Jago Douma 725be9ff54
Merge branch 'master' of https://github.com/owncloud/client into oc_master 2017-11-20 13:29:59 +01:00
Christian Kamm 14a51458ab Link share: Move 'delete' button to the bottom #6163 2017-11-20 12:42:41 +01:00
Christian Kamm aafe7c4732 Merge remote-tracking branch 'origin/2.4' 2017-11-20 11:54:56 +01:00
Christian Kamm 86c2e9e825 Tray: Fix 'Open folder' action creation
It looks like the action was created but not added to the menu. Did this
work with previous Qt versions?
2017-11-20 11:48:55 +01:00
Christian Kamm eff401d418 Share links: Confirm deletion explicitly #6163
Also add the "Delete" action to the "..." menu.
2017-11-16 11:16:47 +01:00
Christian Kamm 06ce8dd8bd Wizard: Add explanation text when server error is shown #6157
Just showing a box with the message can be surprising.
2017-11-15 11:01:44 +01:00
Christian Kamm e616f904b6 Share link: Add tooltip to delete button #6163 2017-11-15 10:16:33 +01:00
Christian Kamm 18091f99d4 Private links: Retrieve numeric file id property #6146
Some servers have non-compliant instance ids (that start with a number)
and thereby make deducing the numeric file id from the full id
unreliable.

To circumvent this problem we retrieve the fileid property from the
server with a PROPFIND.
2017-11-14 12:14:11 +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
Tomaz Canabrava 8adfc28de7 [CSE] Store lock-token and retrieve later 2017-11-13 17:54:19 +01:00
Tomaz Canabrava e32fd58578 [CSE] handle success and failure of metadata upload. 2017-11-13 17:03:40 +01:00
Tomaz Canabrava 22a2ab8999 [CSE] Start to send the metadata to the server 2017-11-13 16:46:30 +01:00
Tomaz Canabrava 05d826a954 Merge branch 'master' into clientSideEncryptionV3 2017-11-11 16:28:20 +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 be9cd358d4 [CSE] Bypass Qt DELETE Bug
It appears that Qt implementation of the DELETE http request
does not send bodyData, and we need that for Nextcloud.
Currently I changed the http request on the server side
to accept a POST instead of a DELETE, so I can actually
develop.

Also, I already poked the Qt developers that did this code.
2017-11-03 17:00:28 +01:00
Tomaz Canabrava ea9e2135a1 [CSE] Remove uneeded comments. 2017-11-03 14:28:13 +01:00
Tomaz Canabrava b53003792f [CSE] Removed lambdas for Metadata / Lock / Unlock 2017-11-03 12:34:30 +01:00
Tomaz Canabrava 6facd29663 [CSE] Start to break the lambdas
Lambda within a lambda is a terrible idea,
Use default signal / slot connections with a
method instead.
2017-11-03 12:00:25 +01:00
Tomaz Canabrava 3b157caf09 [CSE] Handle encrypt / lock / unlock 2017-11-03 11:21:01 +01:00
Christian Kamm c743cc171a Client certs: Improve error message #6128
"Could not load certificate" can very well just be a bad password.
2017-11-02 11:30:44 +01:00
Tomaz Canabrava 1b1add5ead [CSE] Add api to lock file 2017-11-01 17:36:54 +01:00
Christian Kamm 64a84fda38 Wizard: Don't report confusing error message #6116
For historical reasons CheckServerJob doesn't just check url/ but also
url/owncloud/. However, that means if url/status.php is a 404 and
url/owncloud/status.php is a 404, the user will see the latter url
appear in the error message. That's potentially confusing.

Instead, just show the account url which will be closer to what the
user typed into the account wizard, while being adjusted for protocol
and possible redirects.
2017-11-01 15:57:58 +01:00
Tomaz Canabrava 560ce958de [CSE] Remove warning. 2017-10-31 11:24:10 +01:00
Tomaz Canabrava 69d73162aa [CSE] functions for encrypt / decrypt folder
The code was scattered around the slot for the context
menu request and had already too many indentation levels.
2017-10-31 11:09:34 +01:00
Tomaz Canabrava 69dc099b17 [CSE] Dedicated function for the subfolder menu 2017-10-31 11:03:24 +01:00
Tomaz Canabrava c7d9abbea3 [CSE] Rework pubkeyPath to be able to fetch pubKey 2017-10-30 20:02:55 +01:00
Tomaz Canabrava edb04c137c [CSE] Call the FolderMetadata 2017-10-30 19:05:32 +01:00
Tomaz Canabrava 5420741edb Merge branch 'master' into clientSideEncryptionV3 2017-10-30 11:21:36 +01:00
Christian Kamm 05c1bfb6cf Merge remote-tracking branch 'origin/2.4' 2017-10-27 10:29:31 +02:00
Jocelyn Turcotte 10c6951438 Windows: Add a setting to enable/disable the explorer navigation pane integration
Issue #5295
2017-10-24 16:10:53 +02:00
Jocelyn Turcotte 56e38e6f80 Windows: Add sync folders to Explorer's navigation pane
This is only the navigation pane, the SyncRootManager entries aren't handled yet.

This follows the instructions from:
https://msdn.microsoft.com/en-us/library/windows/desktop/dn889934%28v=vs.85%29.aspx

Issue #5295
2017-10-24 16:10:53 +02:00
Olivier Goffart c36043a175 ShareDialog: trigger a sync for folder affected by a change of sharing
This allow the sync engine to query the new metadata and update the
overlay icons.

Note: we also need to invalidate the etags because the server does not
change the etag of parent directories that see their share-types changed.

Issue #6098
2017-10-24 15:50:14 +02:00
Olivier Goffart ee63b36ed3 SyncFileStatusTracker: Detect changed in the shared flag
... even if the file is not changed.

We get an UPDATE_METADATA in that case, so make sure we let the
SyncFileStatusTracker know about it.
That means we need to filter out UPDATE_METADATA in the other listeners
of this signal.

Issue #6098
2017-10-24 15:50:14 +02:00
Olivier Goffart c6bd3ab31a Sharing: remove the ShareManager::_jobContinuation
It is growing indefinitively in case of error, causing a leak.
Use a labda instead to pass the capture
2017-10-24 15:50:14 +02:00
Christian Kamm e85a339d94 Local discovery: Use db instead of filesystem
We mostly trust the file watchers meaning that we don't re-scan the
local tree if we have done that recently and no file watcher events
have arrived. If the file watchers invalidate a subtree, we rescan
only that subtree.

Since we're not entirely sure the file watchers are reliable, we still
do full local discoveries regularly (1h by default). There is a config
file setting as well as an environment variable to control the interval.
2017-10-24 10:00:20 +02:00
Christian Kamm 66f0ce6616 FolderWatcher: reliability and data-loss signal
Add state and signal to catch the following two known problems:
* Linux: inotify user watch pool is exhausted. Folder watcher becomes
unreliable.
* Windows: buffer is too small, some notifications are lost but watching
stays reliable.
2017-10-24 10:00:20 +02:00
Christian Kamm fb2d31c9ce Folder: Move FolderWatcher to Folder
This makes it unnecessary for FolderMan to manage the list and removes
the need for some forwarders.

This is done in preparation for follow-up commits that want to add
diagnostics to FolderWatcher that shall be available from within Folder.
2017-10-24 10:00:20 +02:00
Christian Kamm f3ea375083 Wizard: Resolve url/ redirects only if url/status.php not found
Unfortunately checking the base-url for redirects in all cases lead
to incorrect behavior in some SAML/OAuth2 edge cases.

This new iteration checks the base url for redirects only if the
standard CheckServerJob can't reach the server. That way the 2.3
behavior is only changed in cases that would have lead to errors.

See #5954
2017-10-24 09:42:08 +02:00
Olivier Goffart f41c9fbb7f owncloudsetupwizard: Fix "add new account" if the wizard is already visible
Clicking on the "Add new Account" from the systray menu should raise
the wizard, even if it is already running.

Relates to issue #6105
2017-10-20 12:41:48 +02:00
Olivier Goffart a0e50670de Shibolleth: raise the browser when clicking on the tray
Issue #6105

Dynamically find the browser trough topLevelWidgets instead of
forwarding the call to the relevant page as it would require to break
many abstration layers (OwncloudSetupWizard -> OwncloudWizard ->
AbstractCredentialsWizardPage -> OwncloudShibbolethCredsPage)
And considering that we want to phase shibboleth down, I tought is
was not worth adding an interface for this.

The OAuth page don't have this problem because it shows a label and
allow the user to re-open the browser.
2017-10-20 10:51:35 +02:00
Olivier Goffart a9761a8976 Use qEnvironmentVariable* instead of qgetenv when appropriate
Now that we use Qt5, we should do that. It is slightly more efficient
and declares the intent.
(Modified using clazy)
2017-10-19 13:57:49 +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 08dfe86f37
[CSE] Adjust the calls to ent-to-end encryption
We changed the name.
2017-10-18 21:51:38 +02:00
Tomaz Canabrava 0f1480728e
[cse] Use fake data to verify the encryption
beware, this is broken.
2017-10-18 21:51:38 +02:00
Tomaz Canabrava 60729f1fc4
[cse] Enable OpenSSL for encryption 2017-10-18 21:51:38 +02:00
Tomaz Canabrava 1c85f94b00
[cse] Use server capabilities to query for cse 2017-10-18 21:51:36 +02:00
Tomaz Canabrava f7e74f520b
[CSE] Call encrypt and unencrypt from the GUI
If the server allows client side encryption, show
the user the menu with the encrypt and unencrupt options
2017-10-18 21:51:36 +02:00
Tomaz Canabrava e2091bb0a3
[CSE] Add FileIdRole for the FolderStatusModel
This way we can actually request the id from outside of the model.
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
Tomaz Canabrava 9318c487b9
[CSE] Display menu for encrytp / decryot folders
If the server supports client syde encryption, display
a menu on right click that should display encrypt and decrypt.
ideally it would show the encrypt if the folder is decrypted, and
decrypt if the folder is encrypted but currently there's no way
for the client to know that.
2017-10-18 21:51:36 +02:00
Roeland Jago Douma bc7e65b395
Merge branch 'master' of https://github.com/owncloud/client 2017-10-18 21:03:15 +02:00
Markus Goetz 9866010b4c SettingsDialogMac: Fix account display name #6078 2017-10-18 10:41:01 +02:00
Christian Kamm 17b1c83ae5 Activity: Allow sorting of issues and protocol #6086
The issues tab uses custom ordering where overall and summary sync
issues are displayed first. This ordering is preserved by creating
special sorting logic for the "time" column.

It needed special handling anyway, since sorting by time-string would
have yielded incorrect results.
2017-10-17 09:47:57 +02:00
Christian Kamm f598ac89ac HttpCreds: Fix retry after wrong password #5989
This is an ugly solution.
2017-10-13 14:24:37 +02:00
Christian Kamm 92e90f9c55 Context menu: More detailed status messages
Previously it could only display synchronization progress or "up to
date". Now it also communicates the same overall state that the icon
shows.

See owncloud/enterprise#2134
2017-10-09 14:14:31 +02:00
Olivier Goffart b8f7c6daae CMakeLists.txt: Put -pie as a linker flag were it belongs
Fixes warning introduced by PR #6040
2017-10-06 14:35:56 +02:00
Markus Goetz cd07865da6 Settings Dialog: Fix display name compilation for macOS #6078 2017-10-06 13:34:40 +02:00
Thomas Müller 315e38e814 Use display-name from the ocs call in the settings dialog 2017-10-06 10:59:20 +02:00
rockihack 2bfd85e3c7
Linux Hardening
see: https://wiki.debian.org/Hardening#User_Space
2017-10-05 22:01:38 +02:00
Olivier Goffart cd44d8ed77
Test OAuth2
Include a test for PR #6057
2017-10-05 22:01:38 +02:00
Olivier Goffart c424dec7d4
OAuth: fix compilation with old gcc
We need to used QPointer::data in the signal slot connection

Relates to pr #6065
2017-10-05 22:01:38 +02:00
Markus Goetz 36117336e7
Updater: Rudimentary support for beta channel
So we can get people update from our alpha to the beta and rc
2017-10-05 22:01:38 +02:00
Olivier Goffart d59c146488
Fix encoding of version string 2017-10-05 22:01:38 +02:00
Dominik Schmidt bdd3dc743b
Set CMAKE_INSTALL_RPATH as RPATH for installed executables 2017-10-05 22:01:37 +02:00
Christian Kamm 96a6d64500
Packaging: Make check for theme.qrc more specific #5957
Extracted and adjusted from packaging.diff by @jnweiger and @dschmidt
2017-10-05 22:01:37 +02:00
Christian Kamm f64519bfbd
Move the --version output text to Theme #5957
Extracted and adjusted from packaging.diff by @jnweiger and @dschmidt
2017-10-05 22:01:37 +02:00
Olivier Goffart bbbd2319ed
Use QDateTime::currentDateTimeUtc instead of the non utc version
QDateTime::currentDateTime is terribly slow.
2017-10-05 22:01:37 +02:00
Olivier Goffart 79c775bcd8
OAuth: Fix crash when closing the browser while identifying
To reproduce, log in and click "authorize" on the browser, then close
the browser before the client has replied, (but after redirected to localhost,
i.e. when the client is asking the server for the token)

The problem is that socket can be destroyed so we don't need to answer on a
destroyed socket.
2017-10-05 22:01:37 +02:00
Jocelyn Turcotte 185cb2e39a
Use SyncJournalDb in csync
This gets rid of the csync_statedb sqlite layer and use
the same code and same connection as the rest of the SyncEngine.

Missing functions are added to SyncJournalDb and change a few minor
things (like changing SyncJournalFileRecord::_modtime to be an int64
instead of a QDateTime, like it was in csync).
2017-10-05 22:01:37 +02:00
Jocelyn Turcotte c6610f6fbf
SyncJournalDB: Allow callers of getFileRecord if the query failed
The current implementation would return the same value whether the query failed
or if no row would be found. This is something that is currently checked by csync
and needs to be provided if we want to use SyncJournalDB there.

Adjusted all call sites to also check the return value even though they
could still just rely on rec.isValid(), but makes it more explicit as to what
happens for database errors in those cases, if we ever want to gracefully handle
them.
2017-10-05 22:01:37 +02:00
Markus Goetz cabf7a79d5
macOS: Fix compile 2017-10-05 22:01:36 +02:00
Olivier Goffart 2b12990f19
Httpcreds: Fix double slash in the Request App Password url
Issue #6044
2017-10-05 22:01:36 +02:00
Olivier Goffart 3184d4bb32
OAuth2: Fix double slash in URL
We need to use concatPath to avoid possible double '/' in the URLs if the
account url() ends with '/'.

This has become even more of a problem since commit
d1b8370a4a which was resolving the url after
a redirect where most server actually add a '/' if the url is a folder
2017-10-05 22:01:36 +02:00
Olivier Goffart f793de4629
RemotePermissions: Store in a class rather than in a QByteArray to save memory
Create a specific type that parses the permissions so we can store
it in a short rather than in a QByteArray

Note: in RemotePermissions::toString, we make sure the string is not
empty by adding a space, this was already existing before commit
e8f7adc7ca where it was removed by mistake.
2017-10-05 22:01:35 +02:00
Olivier Goffart 0ad05aee0d
Port to new signal-slot syntax what cannot be done automatically
Some slot were protected or private but needed to be public.
Some needed a static_cast (can't use qOverload because it is in Qt 5.7)

This is not only a partial change.
2017-10-05 22:01:35 +02:00
Olivier Goffart 7aca2352be
Use the Qt5 connection syntax (automated with clazy)
This is motivated by the fact that QMetaObject::noralizeSignature takes 7.35%
CPU of the LargeSyncBench. (Mostly from ABstractNetworkJob::setupConnections and
PropagateUploadFileV1::startNextChunk). It could be fixed by using normalized
signature in the connection statement, but i tought it was a good oportunity
to modernize the code.

This commit only contains calls that were automatically converted with clazy.
2017-10-05 22:01:35 +02:00
Olivier Goffart c219ceea52
Gui: Use lambda instead of QSignalMapper
It's simpler, and QSignalMapper is deprecated in Qt 5.10
2017-10-05 22:01:34 +02:00
Olivier Goffart 608f5034ef
Remove settingsdialog.cpp.Rbt431 2017-10-05 22:01:34 +02:00
Christian Kamm 05927b68a8
Private links: Retrieve link through propfind property #6020
* The sharing ui does a propfind anyway: use that to query the new
property as well!
* For the socket api, asynchronously query the server for the right url
when an action that needs it is triggered.

The old, manually generated URL will be used as fallback in case the
server doesn't support the new property or the property can't be
retrieved for some reason.

Depends on owncloud/core#29021
2017-10-05 22:01:34 +02:00
Olivier Goffart faa7fd1b32
Gui: Allow to add multiple sync folder connection of the same folder
... or child folders

There is also no real reason to forbid the user from syncing the same
folder to multiple location on its hardrive.
A real use case is when the user uncheck a big directory using "choose
what to sync", but would still like to sync a folder within this disabled
tree. The user can now do this with the "add folder" feature

Since 2.3, we even support syncing the same local folder to multiple
remote folder, so why not allow syncing the same remote folder several
times?

Relates to issue #3645
2017-10-05 22:01:34 +02:00
Jocelyn Turcotte 81e32e1a08
Move SyncJournalDB to src/common 2017-10-05 22:01:33 +02:00
Jocelyn Turcotte 0f21ed6a5b
Remove SyncFileItem::_isDirectory
It's always equivalent to _type == SyncFileItem::Directory.
2017-10-05 22:01:33 +02:00
Jocelyn Turcotte 85a93efe51
Remove SyncFileItem::log
This remove the remaining "other" fields of the sync log to save a
bit of memory.

other_etag and other_fileId don't give much information to the users
and other_instruction will always be INST_NONE anyway.

other_modtime and other_size are kept since they are sometimes used.
They were renamed to have a bit more meaningful name.

SyncEngine::checkPermissions will now fetch its information from the
csync trees since they are now preserved until right after this point.

Fixes #3213
2017-10-05 22:01:33 +02:00
Christian Kamm 78b082a23c
Reduce timeout for some admin jobs
The oauth token jobs and the wizard redirect check job shouldn't have
5min timeouts.
2017-10-05 22:01:32 +02:00
Christian Kamm 1aa1e7f833
Wizard: Handle url-shortener redirects #5954
Grab any permanent redirects from the base url the user entered
before attempting to connect to a modified url (with status.php
added).
2017-10-05 22:01:32 +02:00
Christian Kamm 23153a4866
Credentials: Use per-account keychain entries #5830
This requires a lot of migration code: the old entries need to be read,
saved to the new locations and then deleted.
2017-10-05 22:01:32 +02:00
Christian Kamm e47b8ffaca
OAuth: Don't use implicit POST bodies
The query args of POST requests become the request body. If there's a
redirect, the redirected url will therefore not contain the query
arguments. Use an explicit request body to make the redirection work.
2017-10-05 22:01:32 +02:00
Christian Kamm a79b0a3791
OAuth: Pass client auth in header instead of url
To play more nicely with redirects.
2017-10-05 22:01:32 +02:00
Christian Kamm ce51ea34b9
OAuth: Use redirectable jobs for oauth token management 2017-10-05 22:01:32 +02:00
Christian Kamm df05042e7f
Make DetailError different from BlacklistedError
It's quite different in regard to blacklist handling and overall
sync failure changes.
2017-10-05 22:01:32 +02:00
Helmut K. C. Tessarek e8f17f5b0b
remove qt4 code 2017-10-05 22:01:32 +02:00
Christian Kamm 72131ff4ce
Excludes: Allow escaping # #6012
Otherwise adding patterns that start with # are impossible to add, since
they get treated as comments. Also add this escaping for patterns added
in the ui.
2017-10-05 22:01:06 +02:00
Christian Kamm 755b18db61
Folder: Check etag again after active sync #4116
Maybe more things were happening on the server?
2017-10-05 22:01:05 +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
Jocelyn Turcotte a8c33885bb
Fix the macOS Sparkle build 2017-10-05 22:01:04 +02:00
Christian Kamm 3591849279
Http credentials: Fix behavior for bad password #5989
When the GET request from askFromUser is scheduled on the QNAM inside
the slot that handles the QNetworkReply::finished signal, it seems to
not get processed at all.

This workaround moves the sending of the new GET to the event loop,
sidestepping the problem.
2017-10-05 22:01:04 +02:00
Jocelyn Turcotte bfc7ea562d
Move Utility to a new common static library
Now that csync builds as C++, this will avoid having to implement
functionalities needed by csync mandatorily in csync itself.

This library is built as part of libocsync and symbols exported
through it.
This requires a relicense of Utility as LGPL. All classes moved into
this library from src/libsync will need to be relicensed as well.
2017-10-05 22:01:03 +02:00
Jocelyn Turcotte f897a91354
Move csync to src/csync 2017-10-05 22:01:03 +02:00
rockihack ecaa37efbe Linux Hardening
see: https://wiki.debian.org/Hardening#User_Space
2017-09-29 14:34:30 +02:00
Olivier Goffart 0ceb806f1a Test OAuth2
Include a test for PR #6057
2017-09-28 18:38:33 +02:00
Olivier Goffart 1da398e6c6 OAuth: fix compilation with old gcc
We need to used QPointer::data in the signal slot connection

Relates to pr #6065
2017-09-28 10:55:28 +02:00
Markus Goetz 2df74fd9d7 Updater: Rudimentary support for beta channel
So we can get people update from our alpha to the beta and rc
2017-09-27 16:23:34 +02:00
Olivier Goffart d68b07dfc7 Fix encoding of version string 2017-09-27 12:06:49 +02:00
Dominik Schmidt a2ce739192 Set CMAKE_INSTALL_RPATH as RPATH for installed executables 2017-09-27 09:13:44 +02:00
Christian Kamm 9a021d2279 Packaging: Make check for theme.qrc more specific #5957
Extracted and adjusted from packaging.diff by @jnweiger and @dschmidt
2017-09-27 09:13:44 +02:00
Christian Kamm 844bfc5f25 Move the --version output text to Theme #5957
Extracted and adjusted from packaging.diff by @jnweiger and @dschmidt
2017-09-27 09:13:44 +02:00
Olivier Goffart 13e0cc6b50 Use QDateTime::currentDateTimeUtc instead of the non utc version
QDateTime::currentDateTime is terribly slow.
2017-09-26 16:14:17 +02:00
Olivier Goffart 7af81f7665 OAuth: Fix crash when closing the browser while identifying
To reproduce, log in and click "authorize" on the browser, then close
the browser before the client has replied, (but after redirected to localhost,
i.e. when the client is asking the server for the token)

The problem is that socket can be destroyed so we don't need to answer on a
destroyed socket.
2017-09-26 14:56:57 +02:00
Jocelyn Turcotte a034ee894c Use SyncJournalDb in csync
This gets rid of the csync_statedb sqlite layer and use
the same code and same connection as the rest of the SyncEngine.

Missing functions are added to SyncJournalDb and change a few minor
things (like changing SyncJournalFileRecord::_modtime to be an int64
instead of a QDateTime, like it was in csync).
2017-09-26 11:03:23 +02:00
Jocelyn Turcotte 6f46764daa SyncJournalDB: Allow callers of getFileRecord if the query failed
The current implementation would return the same value whether the query failed
or if no row would be found. This is something that is currently checked by csync
and needs to be provided if we want to use SyncJournalDB there.

Adjusted all call sites to also check the return value even though they
could still just rely on rec.isValid(), but makes it more explicit as to what
happens for database errors in those cases, if we ever want to gracefully handle
them.
2017-09-26 11:03:23 +02:00
Markus Goetz 81d9f94a29 macOS: Fix compile 2017-09-23 13:42:39 +02:00
Olivier Goffart 382cc444f0 Httpcreds: Fix double slash in the Request App Password url
Issue #6044
2017-09-23 10:10:40 +02:00
Olivier Goffart 0cec6f08ca OAuth2: Fix double slash in URL
We need to use concatPath to avoid possible double '/' in the URLs if the
account url() ends with '/'.

This has become even more of a problem since commit
d1b8370a4a which was resolving the url after
a redirect where most server actually add a '/' if the url is a folder
2017-09-23 10:10:40 +02:00
Olivier Goffart 95d23b1914 RemotePermissions: Store in a class rather than in a QByteArray to save memory
Create a specific type that parses the permissions so we can store
it in a short rather than in a QByteArray

Note: in RemotePermissions::toString, we make sure the string is not
empty by adding a space, this was already existing before commit
e8f7adc7ca where it was removed by mistake.
2017-09-22 09:29:08 +02:00
Olivier Goffart 35e4fe061d Port to new signal-slot syntax what cannot be done automatically
Some slot were protected or private but needed to be public.
Some needed a static_cast (can't use qOverload because it is in Qt 5.7)

This is not only a partial change.
2017-09-21 14:05:39 +02:00
Olivier Goffart ff4213b59f Use the Qt5 connection syntax (automated with clazy)
This is motivated by the fact that QMetaObject::noralizeSignature takes 7.35%
CPU of the LargeSyncBench. (Mostly from ABstractNetworkJob::setupConnections and
PropagateUploadFileV1::startNextChunk). It could be fixed by using normalized
signature in the connection statement, but i tought it was a good oportunity
to modernize the code.

This commit only contains calls that were automatically converted with clazy.
2017-09-21 14:05:39 +02:00
Olivier Goffart 797f8087bc Gui: Use lambda instead of QSignalMapper
It's simpler, and QSignalMapper is deprecated in Qt 5.10
2017-09-21 14:05:39 +02:00
Olivier Goffart bf77ac6ba5 Remove settingsdialog.cpp.Rbt431 2017-09-21 09:25:45 +02:00
Christian Kamm dca2664707 Private links: Retrieve link through propfind property #6020
* The sharing ui does a propfind anyway: use that to query the new
property as well!
* For the socket api, asynchronously query the server for the right url
when an action that needs it is triggered.

The old, manually generated URL will be used as fallback in case the
server doesn't support the new property or the property can't be
retrieved for some reason.

Depends on owncloud/core#29021
2017-09-19 10:51:03 +02:00
Olivier Goffart 8f5110900c Gui: Allow to add multiple sync folder connection of the same folder
... or child folders

There is also no real reason to forbid the user from syncing the same
folder to multiple location on its hardrive.
A real use case is when the user uncheck a big directory using "choose
what to sync", but would still like to sync a folder within this disabled
tree. The user can now do this with the "add folder" feature

Since 2.3, we even support syncing the same local folder to multiple
remote folder, so why not allow syncing the same remote folder several
times?

Relates to issue #3645
2017-09-18 15:17:06 +02:00
Jocelyn Turcotte a1f1775d15 Move SyncJournalDB to src/common 2017-09-18 14:00:52 +02:00
Jocelyn Turcotte a8ea7b0858 Remove SyncFileItem::_isDirectory
It's always equivalent to _type == SyncFileItem::Directory.
2017-09-18 11:46:09 +02:00
Jocelyn Turcotte 0e97770c47 Remove SyncFileItem::log
This remove the remaining "other" fields of the sync log to save a
bit of memory.

other_etag and other_fileId don't give much information to the users
and other_instruction will always be INST_NONE anyway.

other_modtime and other_size are kept since they are sometimes used.
They were renamed to have a bit more meaningful name.

SyncEngine::checkPermissions will now fetch its information from the
csync trees since they are now preserved until right after this point.

Fixes #3213
2017-09-18 11:46:09 +02:00
Christian Kamm 8635b8ac84 Reduce timeout for some admin jobs
The oauth token jobs and the wizard redirect check job shouldn't have
5min timeouts.
2017-09-15 15:25:10 +02:00
Christian Kamm d1b8370a4a Wizard: Handle url-shortener redirects #5954
Grab any permanent redirects from the base url the user entered
before attempting to connect to a modified url (with status.php
added).
2017-09-15 15:25:10 +02:00
Christian Kamm 671599c8b2 Credentials: Use per-account keychain entries #5830
This requires a lot of migration code: the old entries need to be read,
saved to the new locations and then deleted.
2017-09-15 09:29:05 +02:00
Christian Kamm e05f5fc50d OAuth: Don't use implicit POST bodies
The query args of POST requests become the request body. If there's a
redirect, the redirected url will therefore not contain the query
arguments. Use an explicit request body to make the redirection work.
2017-09-15 09:28:03 +02:00
Christian Kamm da6250fc1f OAuth: Pass client auth in header instead of url
To play more nicely with redirects.
2017-09-15 09:28:03 +02:00
Christian Kamm 7d075cdcb7 OAuth: Use redirectable jobs for oauth token management 2017-09-15 09:28:03 +02:00
Christian Kamm 0c99673581 Make DetailError different from BlacklistedError
It's quite different in regard to blacklist handling and overall
sync failure changes.
2017-09-15 09:27:07 +02:00
Helmut K. C. Tessarek 709aa27031 remove qt4 code 2017-09-15 07:11:05 +02:00
Christian Kamm 0b7ad2c804 Excludes: Allow escaping # #6012
Otherwise adding patterns that start with # are impossible to add, since
they get treated as comments. Also add this escaping for patterns added
in the ui.
2017-09-14 14:53:05 +02:00
Christian Kamm 66415831ea Folder: Check etag again after active sync #4116
Maybe more things were happening on the server?
2017-09-12 13:58:59 +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
Jocelyn Turcotte 5ede5ab4ce Fix the macOS Sparkle build 2017-09-08 13:58:14 +02:00
Christian Kamm 506f7c0764 Http credentials: Fix behavior for bad password #5989
When the GET request from askFromUser is scheduled on the QNAM inside
the slot that handles the QNetworkReply::finished signal, it seems to
not get processed at all.

This workaround moves the sending of the new GET to the event loop,
sidestepping the problem.
2017-09-07 11:23:24 +02:00
Jocelyn Turcotte cf15cbf0b3 Move Utility to a new common static library
Now that csync builds as C++, this will avoid having to implement
functionalities needed by csync mandatorily in csync itself.

This library is built as part of libocsync and symbols exported
through it.
This requires a relicense of Utility as LGPL. All classes moved into
this library from src/libsync will need to be relicensed as well.
2017-09-05 17:25:19 +02:00
Roeland Jago Douma cdc5c1db43
Merge remote-tracking branch 'oc/master' into master-oc 2017-08-23 15:40:35 +02:00
Jocelyn Turcotte 28a0971cdf Move csync to src/csync 2017-08-22 11:18:22 +02:00
Markus Goetz 20a979173f Sync Folder: Add file manager favorite also in folder wizard #455
Not only in the account wizard.
2017-08-04 17:38:01 +02:00
Jocelyn Turcotte 9e36cabcbf macos: Add a sidebar icon
In the process, use an iconset to generate the icns using iconutil.
Also add some missing icon resolutions according to the guidelines.

Issue #296
2017-07-31 18:43:47 +02:00
Olivier Goffart f707a43b3c FolderWizard: fix crash in FolderWizardRemotePath::slotHandleLsColNetworkError
The Job is a LsColJob, not a MkColJob!

Reproduce by entering a name with invalid character that cause an error 400
in the folder wizard's remote path line edit.

(Relates issue #5924)
2017-07-28 11:57:08 +02:00
Jocelyn Turcotte 7a96e8a292 General settings: Put all advanced checkboxes in a layout
The mac style has the concept of Layout Item Rectangle that bleeds
widgets margins into parent margins. This unfortunately doesn't work
when the parent layout doesn't have any margin, like we do when we
have the hierarchy:
 Vertical(normal margin)
   / Horizontal(no margin, uses parent layout spacing)
     /Widget

I guess Qt should propagate remaining uneaten margins to grand-parent
layouts and so on to have this work properly, but nobody seems to
have touched that code since Qt 4.4.
So just try to make the problem less worse by making sure that
all checkboxes we want to align are either in the same layout, or
in a loyout of their own.

Issue #5492
2017-07-27 17:37:27 +02:00
Jocelyn Turcotte 90cce0ab56 Fix the selective sync notification folder list being cropped
The maximumHeight would stay at the last animated value.

Issue #5492
2017-07-27 17:37:27 +02:00
Olivier Goffart 41ed603abf AccountState: reset _waitingForNewCredentials when signin in
Just to force the logic to re-ask the credenticals, in case we were
already asking them when singin off.

Issue: https://github.com/owncloud/client/issues/5893#issuecomment-316949686
2017-07-26 14:58:28 +02:00
Olivier Goffart 6ae88514d8 OAuth: clear refresh token when the server claim not to support oauth
Allow upgrade path when the server removes support for oauth
Relates: https://github.com/owncloud/client/issues/5848#issuecomment-317353049

We also need to force the account to commit the config to the disk,
otherwise we may not register we are no longer using owncloud and we
risk sending the password as the token to the token refresh API call
2017-07-25 12:34:13 +02:00
Olivier Goffart c043840cb1 OAuth: Fix refresh of token after expiration
Before commit d3b00532b1,
fetchFromKeychain was called everytime we detect that the creds are
invalid (in AccountState::slotInvalidCredentials)
But since that commit, AccountState was calling askFromUser directly,
breaking the refresh of the token.

So I made sure AccountState::slotInvalidCredentials still calls
refreshAccessToken.

Another change that was made was too be sure to clear the cookies
in HttpCredentials::invalidateToken even when we are only clearing the
access_token. That's because the session with a cookie may stay valid
longer than the access_token
2017-07-25 12:34:13 +02:00
Jocelyn Turcotte a41dc00160 Don't keep the list of touched files for the whole sync
We only want to know if they were touched within the last 15 seconds,
so change the data structure to use a QMultiMap, and sort them by
QElapsedTimer. This allows us to iterate over old entries ordered by
time and to stop once we find a recent entry.

This makes the look-up slower but in most cases the folder watcher
will report any change within milliseconds, and we start from the
most recent. What this really makes slower are actual user file
changes while a fast sync is underways which will need to iterate
over the whole map to find out the file isn't there.

This reduces the growth of the memory usage when downloading a large
amount of files.
2017-07-24 17:54:29 +02:00
Olivier Goffart 50874eecfa OAuth: Add the user in the authorize call
Issues: #5897, https://github.com/owncloud/oauth2/issues/48
2017-07-17 10:13:12 +02:00
Olivier Goffart 06f3a70f9a OAuth: Better message when loggin in with the wrong username
Since the user is already in the browser, put the error message in the
browser with a message to log out and then log in as the right user.

Issue #5895
2017-07-14 11:17:24 +02:00
Christian Kamm bd107e133f Ensure qsrand is called 2017-07-13 18:06:40 +02:00
Olivier Goffart 5738110cb6 OAuth2: Have a link to the browser in the owncloud UI
When the browser is open, ad a link in the ui to re-open
the browser.

Issue #5893
2017-07-13 16:09:42 +02:00
Christian Kamm 7979342edf AccountSettings: Draw a box to indicate pending conflicts 2017-07-13 11:48:10 +02:00
Christian Kamm 2cdf5517cb Conflicts: Detect and show in issues tab
Incidentally fixes a potential issue where conflicts were silently-
ignored and thus deleted if the parent folder was deleted.
2017-07-13 11:48:10 +02:00
Christian Kamm fe0de111fd IssuesWidget: Fix insertion of sync errors before item errors 2017-07-12 10:10:00 +02:00
Christian Kamm 971abaea80 IssuesWidget: Add button to retry 507 errors #5537
Since these errors are blacklisted, it can take up to 24h to retry items
that had a 507 error for a while. This way users can intervene and cause
an upload attempt immediately.
2017-07-12 09:04:27 +02:00
Christian Kamm a76670f3b8 IssuesWidget: Hide folder column when possible 2017-07-12 09:04:27 +02:00
Christian Kamm e13b618a65 Add ElidedLabel
A label that adjusts its text based on Qt::TextElideMode.
2017-07-12 09:04:27 +02:00
Christian Kamm c3cb186952 ProgressInfo: Carry a sync status
* A bunch of code was determining sync status by ad-hoc comparing some
  progress info fields. It can now just check the status, making it
  easier to comprehend.
* There's a clear indication for "a new sync is starting", which helps
  wiping the issues tab at the right time.
2017-07-12 09:04:27 +02:00
Christian Kamm 5ca743dd25 SyncEngine: Introduce overall errors that are not tied to a file #5746
For now we use them for:
* csync errors: This allows them to appear in the sync issues tab
* insufficient local disk space, as a summary of individual file errors

Insufficient remote space will use them too, as might other issues that
are bigger than a single sync item.
2017-07-12 09:04:27 +02:00
Olivier Goffart d34dbbdb0b OAuth: Redirects to the server in case of sucessfull login
Requires https://github.com/owncloud/oauth2/pull/45

This commit moves the reply after we got the token reply from
the server, that allows to reply with an error to the browser
if the login does not work.
2017-07-11 09:56:04 +02:00
Christian Kamm 1c9b51c330 IssuesTab: Hide filters if they wouldn't be useful
As suggested by @dragotin
2017-07-10 11:13:48 +02:00
Christian Kamm 122854af77 FolderMan: Add missing folderListChanged emits
She signal of a folder list change was not emitted when folders were
deleted from the list.
2017-07-10 11:13:48 +02:00
Christian Kamm a5ace5e71d Account/Credentials: Have identical lifetimes
The QNAM may continue to outlive both.

Rename Credentials::getQNAM() to createQNAM() while we're at it - it's
used to make a new QNAM that will subsequently be owned by the Account
object.

See d01065b9a1 for rationale.

Relates to
d40c56eda5
147cf798a6
2017-07-08 13:07:13 +02:00
Christian Kamm 99b1f69271 Link share: Remove direct download if unavailable #5837
It would have been much nicer to keep the menu assigned to the
QToolButton, but if one switches away from InstantPopup (to adjust the
entries before they're displayed), the button always gets a menu
indicator that can't be removed.
2017-07-07 11:23:32 +02:00
Christian Kamm e54be1c4ee Link shares: Add "show file listing" option #5837 2017-07-07 11:23:32 +02:00
Christian Kamm 411621bf03 shell integrations: Change share menu title to "Share..."
Since the appname is in the context submenu title already.

Also drop APPNAME string.
2017-07-07 10:50:07 +02:00
Christian Kamm ca2ffd4fb3 SocketAPI: Change strings to a consistent _MENU_TITLE postfix 2017-07-07 10:49:51 +02:00
Jocelyn Turcotte 3b20684dc7 shell/macos: Remove legacy (< 10.10) overlay icons
Having to update the plugins to add a submenu in the context menu,
it's more cost-effective to remove support for legacy macOS versions
than implementing and testing this setup.
2017-07-07 10:49:51 +02:00
Jocelyn Turcotte 389499d639 SocketApi: Add GET_STRINGS:BEGIN and END
The Windows shell extension relied on the response of
SHARE_MENU_TITLE to advance its state machine, but in order
to use the new GET_STRINGS instead, we need to know when the
last string was received. Also add BEGIN for consistency.
2017-07-07 10:49:51 +02:00
Jocelyn Turcotte 7b58a82840 SocketApi: Adjust the format of the mailto: URL
Minor tweaks that weren't actually an issue, but just in case.
2017-07-07 10:49:51 +02:00
Jocelyn Turcotte 9d818066a7 SocketApi: Improve logging 2017-07-07 10:49:51 +02:00
Christian Kamm 0238a29c7c Introduce private link sharing #5023
* SocketAPI has COPL_LOCAL_LINK / EMAIL_LOCAL_LINK commands
* The nautilus and dolphing shell integrations show a submenu from which
  one can share as well as access the private link.
* The SocketAPI provides a new GET_STRINGS command to access localized
  strings.
* The private link can also be accessed from the user/group sharing
  dialog.
* The numeric file id is extracted from the full id to create the
  private link url.
2017-07-07 10:49:51 +02:00
ckamm ce8341ca1f Add a more functional error view #5516 (#5861)
* Add a more functional error view #5516

* Allow filtering of ignores and warnings to see only important bits.
* Navigate from the folder view to the error view by clicking on the
  error list with the red background.
* Move the error list into its own ui file to allow easier extension.
* Fix issue around tab id handling in ActivitySettings.
* Rename "Action" column to "Issue".
* Change mouse cursor to hand over button and new error list area

Several OSX fixes provided by guruz.
2017-07-04 14:08:41 +02:00
Christian Kamm 9493e8f42e AccountState: Add a 1-5min reconnection delay #5872
This only applies when the server was explicitly in maintenance mode or
when it was 503-unavailable.
2017-07-04 13:12:41 +02:00
Christian Kamm b1aaf055b1 Blacklist: Don't let errors become warnings #5516
Before, blacklisted errors were set to FileIgnored status and hence
displayed as warnings. Now, they have their own BlacklistedError
category which allows them to appear as errors in the issues list and in
the shell integration icons.
2017-07-04 13:07:51 +02:00
Olivier Goffart 34e75f80bc main.cpp: Fix a compiler warning
src/gui/main.cpp:112:9: warning: bool literal returned from 'main' [-Wmain]

Used 1 to keep previous behaviour. I supposed the code was meant
to return success (0), but it does not really matter anyway.
2017-07-04 11:43:07 +02:00
Jan-Christoph Borchardt 3d2f5b6af1
Change wording from synchronizing to synchronized 2017-06-29 15:36:57 +02:00
Christian Kamm 15ee7b39ac Merge remote-tracking branch 'origin/2.3' 2017-06-22 14:06:31 +02:00
Christian Kamm 1e78a14f1a Ignore ui: Add the sync journal patterns #5844
The ignore patterns for the journal files are hardcoded. Add them to
the UI to make them discoverable.
2017-06-20 13:35:34 +02:00
Christian Kamm 4291ea47f7 Journal: Don't use a ._ path if it won't work #5633
When synchronizing a folder on a samba share, creating files that begin
with ._ is often forbidden. This prevented the client from creating
its ._sync_abcdef.db file.

Now, it'll check whether the preferred filename is creatable, and if
it isn't it'll use .sync_abcdef.db instead.

The disadvantage is that this alternative path won't be ignored by
older clients - that was the reason for the ._ prefix.
2017-06-20 13:35:34 +02:00
Olivier Goffart 85d8ae6b93 AccountSettings: Triggering log in re-ask about previously rejected certificates #5819
Issue #5819
2017-06-14 11:48:24 +02:00
Olivier Goffart 5100a2daf1 OAuth: cleanup debug messages
- Add category to the all messages (they did not have it was merged right after
the patch to add category everywhere, but this code did not have it.)

- Make sure there is no warnings in the normal flow. (The wizard does a request
without authentication to determine the auth type)
2017-06-13 12:08:24 +02:00
Olivier Goffart 6e57b0219e Don't link dirrectly against openssl
All our crypto code is handled by qt nodaways.
No need to carry this dependency.

Especially since it causes warnings on system where there are
twp openssl version installed:
/usr/bin/ld: warning: libcrypto.so.1.0.0, needed by /usr/lib/libQt5Network.so.5.9.0, may conflict with libcrypto.so.1.1
2017-06-13 11:27:23 +02:00
Christian Kamm 4b0d956b3d OAuth: Fix a typo in the success message 2017-06-12 12:58:20 +02:00
Olivier Goffart 85408961ba Wizard: Don't let the second to last page go back with OAuth2
We don't want to re-open the browser in that case.
2017-06-12 12:58:20 +02:00
Olivier Goffart 04b6794318 OAuth: Error handling in the wizard
Issues: #5813 and #5811
2017-06-12 12:58:20 +02:00
Christian Kamm aeeb408c74 Merge branch '2.3' 2017-06-08 13:02:34 +02:00
Olivier Goffart c17a678385 FolderStatusModel: fix assert in Qt when the list of subfolder is empty
Fix an assert that happens in beginInsertRows when opening a folder
and that folder is empty.
This can only be reproduced with a debug build of Qt.
2017-06-06 14:49:03 +02:00
Olivier Goffart 3d93527a8e Authentication with OAuth2
When the OAuth2 app (https://github.com/owncloud/oauth2) is enabled,
We will open a browser and perform the OAuth2 authentication

Issue: #4798 and https://github.com/owncloud/platform/issues/17
2017-06-01 10:39:33 +02:00
Julius Härtl b7fa50be4c Set proper application name, icon name for freedesktop notifications
Use application name defined in OEM build configuration
2017-06-01 10:01:05 +02:00
Markus Goetz 42751f87d9 Application: debug implies logdebug 2017-05-29 22:05:26 +02:00
Olivier Goffart f88431adbf Don't call QElapsedTimer::restart on uninitialized timer
That's an undefined behavior.
Since we don't use the return value anyway, we should just use start()
2017-05-29 10:51:05 +02:00
Christian Kamm 03aa7e3044 Sharing: Disable 'set password' button when password is empty #5788 2017-05-22 14:41:06 +02:00
Christian Kamm 91f6cae168 Share dialog: Use default icon if available #5781 2017-05-22 14:15:53 +02:00
Christian Kamm ddd584077c Share link: Fix disabled API/sharing #5778
* Don't hide the displayed error directly after showing it
* Don't try to fetch shares when sharing isn't possible
2017-05-22 10:59:57 +02:00
Christian Kamm 8201f0b6ea Share Dialog: Remove unused hline 2017-05-22 10:59:57 +02:00
Christian Kamm f2b5fcd706 Share link: Fix parsing integer ids #5777
Older ownCloud servers like 8.2.0 used to use integer ids.

This broke when switching to QJson because toString() on JSON
values is strict and returns "" for integers.
2017-05-22 10:54:30 +02:00
Christian Kamm 950439e5b8 Sharing dialog: Ensure error labels are expanding #5774 2017-05-22 10:52:52 +02:00
Christian Kamm f24cdf5a05 Share dialog: Hide the icon when unused
Previously this used up some space when there was no icon, leading
to an oddly indented header.
2017-05-22 10:52:52 +02:00