Commit Graph

188 Commits

Author SHA1 Message Date
Robin Appelman 03c79ac24f remove custom controler for user provided password auth 2016-01-29 14:51:30 +01:00
Robin Appelman 5bdcd534b1 dont show user provided auth as option for personal mounts 2016-01-29 14:51:30 +01:00
Robin Appelman 860d51487b Allow setting user provided credentials from the personal settings page 2016-01-29 14:51:30 +01:00
Robin Appelman 3c8aac3867 Add mount option to disable sharing 2016-01-29 13:14:26 +01:00
Robin McCorkell 405e2d9b50 Fix validation of inputs that aren't text 2016-01-26 17:42:35 +00:00
Jesús Macias 3ae928c661 Change icon only on WND and Sharepoint external storages 2016-01-15 13:06:12 +01:00
Jesús Macias 5aa5d3a9ae Fis bug issue 21110 2016-01-15 12:13:16 +01:00
Robin Appelman c15cab7ed6 Allow admins to add system wide root certificates 2016-01-12 12:50:59 +01:00
Thomas Müller c1d8a03662 Merge pull request #21517 from owncloud/ext-oauth-fix
Fix OAuth external storage auth for step 2
2016-01-11 13:36:58 +01:00
Thomas Müller df2abda814 Merge pull request #21438 from owncloud/settings-anchors
remove unneeded 'goto' prefix from settings anchors
2016-01-11 11:53:40 +01:00
Robin Appelman a696d6c561 Fix checking external storage status as non admin user 2016-01-08 12:42:22 +01:00
Robin McCorkell 430c5df6c4 Fix OAuth external storage auth for step 2
Parameters are only available after the onCompletion promise is run
2016-01-07 16:44:17 +00:00
Robin Appelman dbafec0c28 Also remove it from the web interface 2016-01-07 08:57:15 +01:00
Jan-Christoph Borchardt bfee488c56 remove unneeded 'goto' prefix from settings anchors 2016-01-04 12:59:32 +01:00
Jesus Macias Portela dcfbbe4737 Merge branch 'master' into issue_20427 2015-12-03 12:35:49 +01:00
Vincent Petry dc962a1203 Fix ext storage mount options dropdown 2015-11-30 14:59:06 +01:00
Thomas Müller 9385eef31a Merge pull request #18999 from owncloud/ext-config-listadmin
Improvements to external storages list rendering
2015-11-24 16:03:35 +01:00
Jesús Macias 70071c8865 Fix css selector and bug checking personal mounts status 2015-11-24 11:55:33 +01:00
Jesús Macias 674bc8e9cb Add css to manage row status color 2015-11-24 08:52:02 +01:00
Jesús Macias 5580b562a3 Fix code from PR comments 2015-11-24 08:16:14 +01:00
Robin McCorkell 08839ce77d Defer initialisation of data until after complete construction 2015-11-22 17:25:32 +00:00
Vincent Petry ec3166742b Properly join path sections
This prevents double slashes that can mess up path comparisons in some
cases.
2015-11-22 16:05:51 +01:00
Robin McCorkell ee7128b435 Clear highlight on RSA public key generation 2015-11-21 22:54:21 +00:00
Robin McCorkell c5966ed21b Only set value if it exists in the StorageConfig 2015-11-21 22:54:21 +00:00
Robin McCorkell be8afc2c12 Reset mountpoint input field when creating new mount 2015-11-21 22:54:21 +00:00
Robin McCorkell 6a2e7632d1 Fix JS unit tests 2015-11-21 22:54:21 +00:00
Robin McCorkell 2efffb810d Load applicable users/groups correctly 2015-11-21 22:54:21 +00:00
Robin McCorkell 28876bf463 Display applicable global storages in personal mount list 2015-11-21 22:54:21 +00:00
Robin McCorkell a1704c8623 Render external storages list in JS 2015-11-21 22:54:21 +00:00
Jesús Macias 31cfd43e8a Adding logic to show custom icon for current backends, waiting for icon files 2015-11-20 08:42:31 +01:00
Jesús Macias ae061bcbed Fix code from PR comments 2015-11-18 18:34:26 +01:00
Jesús Macias fab13b7ca5 Add method to show custom icon and icon-error for each storage backend 2015-11-18 12:12:32 +01:00
Jesús Macias a413f8eccc Add icon management capabilities (error icon) 2015-11-13 12:57:33 +01:00
Jesús Macias 394d3eb0cd First working approach to show mount status 2015-11-12 13:40:28 +01:00
Thomas Müller 911613f711 Merge pull request #19100 from owncloud/ext-tooltip-unavailable
Display external storage status as tooltip
2015-10-29 11:25:52 +01:00
Vincent Petry f24386c491 Fix file list reload callback result
All reloadCallback must return either true for success or false in case
of failure / non-existing folder.

Some file lists only have a root folder (favorite, shares), so restrict
the path to that to avoid having a wrong path in the breadcrumbs.
2015-10-27 11:51:54 +01:00
Robin McCorkell 9a4d37f626 Display storage status as tooltip 2015-10-23 15:25:07 +02:00
Robin McCorkell 4ac33ab26b Remove status indicator on modification 2015-10-23 15:25:07 +02:00
Robin McCorkell 2bef3ef34b Hide deprecated backends in external storage GUI
Selecting/deselecting the deprecate-to backends in the user mountable
storages selection will also change the corresponding deprecated
backend.
2015-09-23 12:10:02 +02:00
Hendrik Leppelsack 624f5de67a fix checkboxes in files_external 2015-09-19 10:36:38 +02:00
Robin McCorkell 0dc7181335 Merge pull request #18441 from owncloud/ext-backends.advanced
Migrate advanced external storage backends to new registration API [part 3]
2015-09-13 19:38:22 +01:00
Robin McCorkell f1e97433f7 Set default mount options for external storages 2015-09-03 14:57:14 +01:00
Robin McCorkell 1084e3adc7 Migrate SFTP_Key external storage to new API
The SFTP backend now supports public key authentication alongside
password authentication.
2015-08-28 12:58:47 +01:00
Robin McCorkell 88a78237b0 Migrate Google external storage to new API 2015-08-25 00:22:10 +01:00
Robin McCorkell a50ef61876 Migrate Dropbox external storage to new API 2015-08-25 00:22:10 +01:00
Robin McCorkell f505883e45 Add on-backend and on-auth-mechanism events to JS 2015-08-25 00:22:10 +01:00
Robin McCorkell dc335ba5a9 Trigger storage recheck on auth mechanism change 2015-08-19 20:11:29 +01:00
Robin McCorkell df8f5425dc Load custom JS for all backends/auth mechanisms
Loading custom JS on a per-backend basis added needless complexity and
made dealing with async required. Now all backends/auth mechanisms load
custom JS in PHP
2015-08-19 10:08:23 +01:00
Robin McCorkell b6eb952ac6 Propagate auth mechanism/backend failures to filesystem layer
Failure to prepare the storage during backend or auth mechanism
manipulation will throw an InsufficientDataForMeaningfulAnswerException,
which is propagated to StorageNotAvailableException in the filesystem
layer via the FailedStorage helper class.

When a storage is unavailable not due to failure, but due to
insufficient data being available, a special 'indeterminate' status is
returned to the configuration UI.
2015-08-19 10:08:23 +01:00
Robin McCorkell 1eeca031f8 Split backend identifiers from the class name
Prior to this, the storage class name was stored in mount.json under the
"class" parameter, and the auth mechanism class name under the
"authMechanism" parameter. This decouples the class name from the
identifier used to retrieve the backend or auth mechanism.

Now, backends/auth mechanisms have a unique identifier, which is saved in
the "backend" or "authMechanism" parameter in mount.json respectively.
An identifier is considered unique for the object it references, but the
underlying class may change (e.g. files_external gets pulled into core
and namespaces are modified).
2015-08-19 10:05:11 +01:00
Robin McCorkell 272a46ebe1 Authentication mechanisms for external storage backends
A backend can now specify generic authentication schemes that it
supports, instead of specifying the parameters for its authentication
method directly. This allows multiple authentication mechanisms to be
implemented for a single scheme, providing altered functionality.

This commit introduces the backend framework for this feature, and so at
this point the UI will be broken as the frontend does not specify the
required information.

Terminology:
 - authentication scheme
    Parameter interface for the authentication method. A backend
    supporting the 'password' scheme accepts two parameters, 'user' and
    'password'.
 - authentication mechanism
    Specific mechanism implementing a scheme. Basic mechanisms may
    forward configuration options directly to the backend, more advanced
    ones may lookup parameters or retrieve them from the session

New dropdown selector for external storage configurations to select the
authentication mechanism to be used.

Authentication mechanisms can have visibilities, just like backends.
The API was extended too to make it easier to add/remove visibilities.
In addition, the concept of 'allowed visibility' has been introduced, so
a backend/auth mechanism can force a maximum visibility level (e.g.
Local storage type) that cannot be overridden by configuration in the
web UI.

An authentication mechanism is a fully instantiated implementation. This
allows an implementation to have dependencies injected into it, e.g. an
\OCP\IDB for database operations.

When a StorageConfig is being prepared for mounting, the authentication
mechanism implementation has manipulateStorage() called,
which inserts the relevant authentication method options into the
storage ready for mounting.
2015-08-19 10:05:11 +01:00
Morris Jobke 80d4309669 Fix files_external l10n
* current l10n..pl script can't extract JS functions that are within a handlebars
  template - therefore they are duplicated until the script is fixed
2015-05-30 14:00:52 +02:00
Robin Appelman 519d568847 add unit test 2015-04-02 18:31:26 +02:00
Robin Appelman 10b85871cc adjust unt tests 2015-04-02 18:17:28 +02:00
Robin Appelman bac9b54bef Add mount point to disable the encryption wrapper 2015-03-31 16:25:33 +02:00
Vincent Petry ca6b715b31 Added ext storage mount options GUI
Added option to disable autoscan of external storages
Mount option file system scan is now an int
Move priority field to avoid undefined field in storage options

All input elements inside the storage options block get parsed into
storage options.

Moving the priority field outside prevents it to appear in the storage
config, as expected. It is still parsed by special code.
2015-03-26 11:21:03 +01:00
Robin McCorkell c68fd6d5e3 Use individual timers for separate config rows 2015-03-24 22:25:30 +00:00
Robin McCorkell c37913b1d5 Introduce async status checking 2015-03-20 09:48:14 +00:00
Vincent Petry 34c8b1ac77 Mount options for ext storage are now passed around
The mount options are now passed to the UI and stored in a hidden field.
The ext storage controllers and services also know how to load/save them
from the legacy config.
2015-03-13 12:49:11 +01:00
Robin McCorkell 680ec056dc Implement priority on client side in hidden input 2015-03-12 18:51:02 +01:00
Vincent Petry ce94a998dd Use storage id + appframework for ext storage CRUD
- Added StorageConfig class to replace ugly arrays
- Implemented StorageService and StorageController for Global and User
  storages
- Async status checking for storages (from Xenopathic)
- Auto-generate id for external storage configs (not the same as
  storage_id)
- Refactor JS classes for external storage settings, this mostly
  moves/encapsulated existing global event handlers into the
  MountConfigListView class.
- Added some JS unit tests for the external storage UI
2015-03-12 18:51:02 +01:00
Vincent Petry bd01ff135a Merge pull request #13190 from is-apps/master-sftp-key
Add SFTP public key authentication support
2015-02-10 16:44:29 +01:00
Ross Nicoll 7620af7550 Updated Dropbox and Google UI Javascript to create input elements instead of anchor. 2015-01-14 17:21:39 +00:00
Ross Nicoll 64f4f8fc84 Add support for SFTP key authentication
Add support for external files accessed via SFTP using public key exchange authentication.
Keys are generated automatically when the configuration is added, or can be regenerated on demand if a key is compromised.
Creation of a new configuration row now triggers focus on that row. This is used to trigger auto-configuration for SFTP keys.
Generated public keys are saved in user's data directory for easy retrieval by an external application.
Add controller for SFTP key generation AJAX
SFTP class initialisation no longer produces a warning if the password field is missing.
Add unit tests for SFTP with key authentication backend
2015-01-14 17:00:34 +00:00
Volkan Gezer 26645c072a translated saved message in files external 2014-12-08 21:40:15 +01:00
Vincent Petry 0f3e6cb50a Improved Javascript docs for JSDoc
Added namespaces so that JSDoc can find them.
Fixed a few warnings.
Improved some comments.
2014-10-31 13:43:30 +01:00
Jörn Friedrich Dreyer 7535b09851 cleanup variable names and duplicate jQuery selectors 2014-10-13 18:40:57 +02:00
Jörn Friedrich Dreyer 7f1ba86789 fix flickering users 2014-10-13 17:58:29 +02:00
Robin McCorkell 0e8a973579 Improve UI of external storage configuration
* Highlight fields that need to be filled
 * Remove (required) and (optional) strings where possible
 * Focus first configuration field when creating new external storage
 * Add ability to force external storage re-check
 * Various jQuery improvements
 * Prevent wrapping of checkboxes in configuration
2014-08-30 09:02:37 +01:00
Lukas Reschke f33312f767 Use AppFramework instead of custom controller 2014-08-25 11:50:19 +02:00
Jörn Friedrich Dreyer 6202ef3258 use displayname lookup route in files_external settings 2014-08-25 11:50:19 +02:00
Jörn Friedrich Dreyer 393d136faf fix deletion of shares 2014-08-25 11:50:19 +02:00
Jörn Friedrich Dreyer 308e8d6379 replace chosen with select2 to provide ajaxified user and group selection for files_external, fixes #7499
remove minified select2 js

show avatars for users, simpler results

remove unneeded users and groups from settings template

fix css, escape user and group names
2014-08-25 11:50:19 +02:00
Stephane V 934229d1fb Fix #9590. Fix #9612.
For external storage with lots of parameter settings (>4), wrap the content of the cell to let a full view of the parameters.
The rows of the table are now always visible until the end (the trash icon is accessible).
(Note : A strange 3px margin forces me to add a class on the row added by javascript, to be able to align them with the rows rendered by the server.)
2014-07-15 22:33:30 +02:00
Vincent Petry dd7529da98 Added mountType attribute and adapted Delete action text
Added mountType attribute for files/folder to indicated whether they are
regular, external or shared.

The client side then adapts the "Delete" action hint text based on this
information.

Only the mount roots must have the delete icon hint adapted.
To make this detectable on the client side, the mountType can now
be null, "shared", "shared-root", "external" or "external-root".

This also gives room to icon customization on the client side.
2014-07-14 10:36:04 +02:00
Robin Appelman 128c226063 When changing the mountpoint of an external storage, ensure the old one is removed 2014-07-07 15:40:01 +02:00
Vincent Petry 59ca30d462 Fix reload call for all subclasses
All subclasses must also properly return the ajax call object.
2014-07-04 11:45:36 +02:00
Morris Jobke 0a2c676cda fix camelCase and avoiud re-wrapping $() 2014-06-16 11:35:48 +02:00
Morris Jobke 78b6f59523 fix typo - Backups -> Backends 2014-06-16 11:33:51 +02:00
Morris Jobke 86e1d8ca54 AllowUserMount defaults now to all backends fixes #7958 2014-06-13 18:14:41 +02:00
Vincent Petry e39e6a5584 Fixed delete button CSS in ext storage list 2014-06-06 15:33:33 +02:00
Vincent Petry 710d017eec Added more columns to ext storage list
Now using system mount and personal mount calls to get the relevant
mount points including backend information.
2014-06-06 15:06:26 +02:00
Vincent Petry a47ef52ae2 Fixed ext storage list sorting 2014-06-06 15:06:26 +02:00
Vincent Petry 01c2c3107a Added external storage list in files app 2014-06-06 15:06:26 +02:00
Robin McCorkell 690c31ec20 Insert missing brace 2014-03-24 13:27:46 +00:00
Robin McCorkell c4e7d7989a Enable the use of 'optional' on password fields (JavaScript part)
See ed0c10a10b
2014-03-21 13:51:45 +00:00
Jan-Christoph Borchardt 7ad7f94797 fix some spaces to tabs issues reported by Scrutinizer 2014-03-05 15:47:12 +01:00
Joas Schilling 932c4ee927 Allow admins to disable certain external storages for users
Fix issue #6793
2014-02-26 15:02:41 +01:00
Vincent Petry e13be94e56 Fixed Dropbox/Google storage async save call
When clicking "Grant access", the settings for Dropbox/Google were saved
through a call that gets cancelled when redirecting to the grant page
(for example in Firefox)

This fix makes sure the "save settings" call finished before redirecting
to the grant page.

Fixes #6176
2013-12-06 17:25:09 +01:00
Vincent Petry bced346c3b Now using smaller spinner image for status indicator
To make the status indicator appear smaller, even in IE8 that doesn't
support background-size, there is no a smaller animated gif
"loading-small" for that purpose.
2013-10-11 12:36:30 +02:00
Vincent Petry e88b493136 Fixed external storage status indicator in admin page
- Fixes #5241
- Fixed indicator to appear, its selector was wrong
- Added spinner while saving an entry's settings
- Removed ajax "async: false" that blocked the browser while saving
2013-10-10 11:12:21 +02:00
kondou 9e8a6b704d Add _many_ newlines at the end of files 2013-08-18 11:06:59 +02:00
Thomas Müller 24b4806af4 Merge branch 'master' into googledrive 2013-07-12 09:43:04 +02:00
Björn Schießle 506c9de5cd backport of 1fa76e53dc 2013-06-12 10:30:54 +02:00
Michael Gapczynski d8c660c6d5 Switch to using Google Drive SDK, closes #2047 2013-05-16 20:09:32 -04:00
Michael Gapczynski 5b50bc8c0a Fix Dropbox and Google ui 2013-02-25 19:45:01 -05:00
Jörn Friedrich Dreyer 05a8766cbc attach on() events to external storage table, dom events in the table will always bubble up here 2013-02-20 12:06:08 +01:00
Michael Gapczynski 702c27b0e6 Merge branch 'master' into external_storage_ui_feedback
Conflicts:
	apps/files_external/js/settings.js
	apps/files_external/lib/smb.php
	apps/files_external/templates/settings.php
	lib/files/storage/common.php
2013-02-19 19:12:14 -05:00
Thomas Mueller 6a250c877f fixing javascript errors IE8 in personal settings 2013-02-14 16:10:52 +01:00
Thomas Mueller 037c3ee4ec fixing issues with UTF8 characters in translatable strings 2013-02-13 00:23:37 +01:00