Commit Graph

24 Commits

Author SHA1 Message Date
Robin McCorkell c592e24c87 Make Application a singleton
The same Application must be used in the settings templates and in
routes, so that any registered backends are correctly seen
2015-08-19 10:08:23 +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
Robin McCorkell 37beb58c6f Introduce BackendService for managing external storage backends
Backends are registered to the BackendService through new data
structures:

Backends are concrete classes, deriving from
\OCA\Files_External\Lib\Backend\Backend. During construction, the
various configuration parameters of the Backend can be set, in a design
similar to Symfony Console.

DefinitionParameter stores a parameter configuration for an external
storage: name of parameter, human-readable name, type of parameter
(text, password, hidden, checkbox), flags (optional or not).

Storages in the StoragesController now get their parameters validated
server-side (fixes a TODO).
2015-08-19 10:05:11 +01:00
Morris Jobke f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Robin Appelman bac9b54bef Add mount point to disable the encryption wrapper 2015-03-31 16:25:33 +02:00
Jenkins for ownCloud b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Vincent Petry 72632ad402 Generate storage config ids when missing
When reading in old mount.json files, they do not contain config ids.
Since these are needed to be able to use the UI and the new service
classes, these will be generated automatically.

The config grouping is based on a config hash.
2015-03-16 12:18:01 +01:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Morris Jobke 226d43a1cf manage select2 via bower 2014-11-06 09:27:12 +01:00
Vincent Petry 412da87e65 Move select2 from files_external to core 2014-09-09 18:03:05 +02:00
Jörn Friedrich Dreyer e09e11b93e no need to load user display names 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
Joas Schilling 932c4ee927 Allow admins to disable certain external storages for users
Fix issue #6793
2014-02-26 15:02:41 +01:00
Arthur Schiwon 599778b153 Files External: show display names instead of internal user names in Settings UI 2013-03-27 19:07:33 +01:00
Lukas Reschke 236507a19f [files_external] From echo to p 2013-02-27 21:31:27 +01:00
Frank Karlitschek c4ecbad009 check if admin 2012-12-17 14:46:57 +01:00
Bart Visscher 8256650da8 Fix "No space found after comma in function call" 2012-12-15 00:43:46 +01:00
Frank Karlitschek f3bd6d14ee add some output why some of the external filesystems might not work 2012-12-10 21:10:28 +01:00
Michael Gapczynski 89fb5d47a4 Add chosen script and style, bug fix for oc-1745 2012-09-16 13:27:27 -04:00
Bart Visscher 0365f8fd01 Remove php close at end of file 2012-08-29 20:29:43 +02:00
Michael Gapczynski 31bba86e87 Fix external storage UI for Admin page 2012-06-28 17:55:22 -04:00
Michael Gapczynski 4b3ae60558 Working UI for external storage mount configuration 2012-06-08 11:42:29 -04:00
Michael Gapczynski bee724c53e Initial work on UI for mounting external storage 2012-05-24 11:06:03 -04:00