Commit Graph

37 Commits

Author SHA1 Message Date
Joas Schilling 0215b004da
Update with robin 2016-07-21 18:13:58 +02:00
Joas Schilling 813f0a0f40
Fix apps/ 2016-07-21 18:13:57 +02:00
Robin Appelman 6affbdc6e7
Add "Global Auth" option to external storage
This adds the "Global Auth" option to the external storage implementation, it is basically done by reverting c2c6caee93 from https://github.com/owncloud/core/pull/22468.

This was taken from owncloud/core which is AGPL licensed. Commited with "icewind@owncloud.com" to keep the license header signature in sync.

![2016-06-21_14-01-06](https://cloud.githubusercontent.com/assets/878997/16228662/9c243136-37b8-11e6-9700-c1076ddb3d17.png)
2016-06-21 14:16:45 +02:00
Joas Schilling 328b3c47d7
Move stuff from outside lib/ to PSR-4 2016-05-24 08:41:20 +02:00
Robin McCorkell a51ece97e3 Display external storage GUI even if user mounting disabled 2016-03-16 22:06:49 +00:00
Robin Appelman c2c6caee93 remove global credentials 2016-02-17 13:55:27 +01:00
Robin Appelman 9dfe9f77f2 Add global auth backend for files external 2016-02-04 14:57:17 +01:00
Thomas Müller 682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Robin McCorkell 28876bf463 Display applicable global storages in personal mount list 2015-11-21 22:54:21 +00:00
Morris Jobke 8366ce2767 deduplicate @xenopathic 2015-10-06 09:52:19 +02:00
Morris Jobke b945d71384 update licence headers via script 2015-10-05 21:15:52 +02:00
Robin McCorkell 2404333300 Perform visibility checks on storages
StoragesService::getStorages() will check the visibility of the backend
and auth mechanism for the storage, and if either are not visible to the
user (aka disabled by admin) then the storage will be filtered out. The
original method StoragesService::getAllStorages() still exists in case
such storages need to be detected, but its use is discouraged.
2015-09-23 16:00:11 +01:00
Robin McCorkell 38a260e963 Revert "Implement more fine-grained external storage permissions model"
This reverts commit 0b97a05e7b.
This reverts commit d2e3c17c00.
This reverts commit cc88c5f4b8.
2015-09-23 12:10:02 +02:00
Robin McCorkell cc88c5f4b8 Implement more fine-grained external storage permissions model
VisibilityTrait -> PermissionsTrait

PermissionsTrait stores two sets of data, $permissions and
$allowedPermissions (analogous to $visibility and $allowedVisibility of
VisibilityTrait). Each set is a map of user type ('admin' or 'personal')
to permissions (mounting permission, create permission).

The result is that a backend can now be restricted for creation, while
still allowing it to be mounted. This is useful for deprecating backends
or auth mechanisms, preventing new storages being created, while still
allowing existing storages to be mounted.
2015-08-28 17:21:58 +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 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
Lukas Reschke 2d2a4741ce Make files non executable
There is not much sense in having these files marked executable, we should avoid that.
2014-10-24 11:14:51 +02:00
Robin Appelman c1b11571ea Move certificate management interface from files_external to core 2014-08-31 10:47:50 +02:00
Robin Appelman ecdbf00628 Move certificate management code to core 2014-08-31 10:45:10 +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
Lukas Reschke 236507a19f [files_external] From echo to p 2013-02-27 21:31:27 +01:00
Robin Appelman 946d58eaa8 merge master into filesystem 2012-12-15 02:21:26 +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
Robin Appelman bd83422095 put filestorages in a namespace 2012-09-07 18:30:48 +02:00
Bart Visscher 0365f8fd01 Remove php close at end of file 2012-08-29 20:29:43 +02:00
Bjoern Schiessle 5d61b85a1d allow users to upload ssl root certificates for the webdav client 2012-07-04 17:18:36 +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