Commit Graph

26549 Commits

Author SHA1 Message Date
Robin McCorkell 16389270ff Migrate SFTP external storage to new API 2015-08-19 14:41:44 +01:00
Robin McCorkell a99e524898 Migrate OwnCloud external storage to new API 2015-08-19 14:41:43 +01:00
Robin McCorkell 68418bdd34 Migrate DAV external storage to new API 2015-08-19 14:41:43 +01:00
Robin McCorkell ab8c738b8d Migrate SMB external storage to new API 2015-08-19 14:41:43 +01:00
Robin McCorkell 0f1809eced Migrate FTP external storage to new API 2015-08-19 14:41:43 +01:00
Robin McCorkell 0ffb51c6cc Migrate Local external storage to new API 2015-08-19 14:41:43 +01:00
Robin McCorkell 3b27603762 Revert "Fix mounting wrapped storages resulting in many-layered wrapping"
This reverts commit 75a5e6e12b.
2015-08-19 14:41:43 +01:00
Robin McCorkell 118cb7df1a Allow builtin auth mechanism to be overridden
The builtin mechanism is used exclusively for legacy external storages,
which when upgraded to the new registration need to fallback to the
defined legacy authentication mechanism instead.
2015-08-19 14:41:43 +01:00
Robin McCorkell 3bb793b6a7 Implement password authentication mechanisms
Introduces the basic password authentication mechanism, along with a
mechanism based on ownCloud credentials stored in the user session.

Change to lib/private is an extension of PermissionsMask, as
isSharable() override was missing.

Session credentials auth mechanism now disables sharing on applied
storages, as credentials will not be available.
2015-08-19 14:20:09 +01:00
Lukas Reschke 40b87b1394 Add warning for not existing CA bundle when updating
For newer releases we shall use an integrity check. But that's a good alternative for now.
2015-08-19 15:03:33 +02:00
Robin McCorkell c693e5d5d1 Unit tests for occ log:* commands 2015-08-19 13:49:41 +01:00
Vincent Petry 5fd36d017e Merge pull request #18378 from owncloud/files-delete-spinner
Fix spinner when deleting all files in a folder
2015-08-19 14:31:23 +02:00
Vincent Petry bd6beaaae2 Merge pull request #18354 from owncloud/files-fixdnd
Fix file drag and drop JS error
2015-08-19 14:30:21 +02:00
Morris Jobke 8fbb0c7b49 Fix format of log/private/ocs.php
Fixes https://github.com/owncloud/core/pull/14314#discussion_r37305256
2015-08-19 14:21:10 +02:00
Robin Appelman beaef820cf handle non existing job classes in $jobList->getNext 2015-08-19 14:16:05 +02:00
Morris Jobke a9bb6be019 Merge pull request #15914 from owncloud/ext-backend-register
Introduce BackendService for managing external storage backends
2015-08-19 14:15:27 +02:00
Joas Schilling 6231bbdde3 Filter the objectstore password from the config list as well 2015-08-19 14:06:05 +02:00
Robin McCorkell 2663f12dc7 config.sample.php logging documentation clarification 2015-08-19 12:55:39 +01:00
Robin McCorkell 07e119a3f8 Introduce occ command to manage owncloud log backend
log:owncloud can set/display the log filename and log file rotation size
2015-08-19 12:55:27 +01:00
Robin McCorkell 67536e71aa Introduce occ command for logging management
log:manage can set/display the log backend, log level and log timezone
2015-08-19 12:33:23 +01:00
Robin McCorkell eb0e5ce12c Restrict Local backend to admin-only 2015-08-19 10:08:24 +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 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 97dbc79c16 Compatibility shims for OC_Mount_Config
The following functions have been removed:
 - addMountPoint()
 - removeMountPoint()
 - movePersonalMountPoint()

registerBackend() has been rewritten as a shim around BackendService,
allowing legacy code to interact with the new API seamlessly

addMountPoint() was already disconnected from all production code, so
this commit completes the job and removes the function itself, along
with disconnecting and removing related functions. Unit tests have
likewise been removed.

getAbsoluteMountPoints(), getSystemMountPoints() and
getPersonalMountPoints() have been rewritten to use the StoragesServices
2015-08-19 10:08:14 +01:00
Robin McCorkell c572631087 Unit tests for new backend API 2015-08-19 10:05:12 +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
Robin McCorkell a6a69ef1df Introduce UserGlobalStoragesService
UserGlobalStoragesService reads the global storage configuration,
cherry-picking storages applicable to a user. Writing storages through
this service is forbidden, on punishment of throwing an exception.
Storage IDs may also be config hashes when retrieved from this service,
as it is unable to update the storages with real IDs.

As UserGlobalStoragesService and UserStoragesService share a bit of code
relating to users, that has been split into UserTrait. UserTrait also
allows for the user set to be overridden, rather than using the user
from IUserSession.

Config\ConfigAdapter has been reworked to use UserStoragesService and
UserGlobalStoragesService instead of
OC_Mount_Config::getAbsoluteMountPoints(), further reducing dependance
on that horrible static class.
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
Thomas Müller 74237a9c44 Merge pull request #18415 from owncloud/apps-command-returncode-successifalreadyenabled
No error code when app already enabled/disabled
2015-08-19 10:51:12 +02:00
Vincent Petry 6c8c8a328a No error code when app already enabled/disabled 2015-08-19 10:26:50 +02:00
Thomas Müller 0b37004808 Merge pull request #18076 from owncloud/fix-thumbnail-api-master
No need to url decode the file
2015-08-19 09:59:14 +02:00
Thomas Müller 9f6c33abe9 Merge pull request #18339 from owncloud/update-jquery-visibility
update jquery-visibility in files app
2015-08-19 09:54:05 +02:00
Morris Jobke 127b6e2f3f Merge pull request #18374 from owncloud/router-apps
Only load app routes if the app has already been loaded [re-merge]
2015-08-19 09:52:09 +02:00
Thomas Müller 4c6dce220b Merge pull request #18384 from owncloud/apps-command-returncode
Return error code on failure with occ app:enable/disable
2015-08-19 09:29:35 +02:00
Thomas Müller d9172a1907 Merge pull request #14401 from owncloud/ux-s2s-ldap
allow login names to be used for s2s with LDAP users
2015-08-19 08:31:27 +02:00
michag86 9ad4510f5b hide delete icon on group for subadmins
because they cannot delete a group
2015-08-18 20:20:19 +02:00
michag86 f84b7907ab do not remove group if it is empty
Sometimes an admin removes a user from a group but he needs the group. 

This is a big problem if a subadmin removes the last user of a group. He cannot recreate the group
2015-08-18 20:18:13 +02:00
Bernhard Posselt 69e72eeb37 Merge pull request #18390 from rullzer/fix_setupchecks
Move remaining setupchecks to new fomat
2015-08-18 17:10:58 +02:00
Bernhard Posselt 66d8476e9e Merge pull request #14314 from owncloud/clean-up-ocs-code
Cleanup OCS code
2015-08-18 16:47:53 +02:00
Morris Jobke 70bce7a54a [admin settings] hide security warnings if empty
* fixes #15257
2015-08-18 16:42:25 +02:00
Thomas Müller 99815c17d9 Merge pull request #18287 from owncloud/smb-1.0.3
update icewind/smb to 1.0.4
2015-08-18 16:35:20 +02:00
Vincent Petry 2411662095 Merge pull request #14825 from rullzer/avatarcontroller_node
AvatarController to all OCP functions/Node API
2015-08-18 16:24:23 +02:00
Morris Jobke 08aaa334cc Merge pull request #18389 from owncloud/fix-17770
Fix extracting basename from path in sharing
2015-08-18 16:22:02 +02:00
Thomas Müller d96afe956e Merge pull request #18392 from owncloud/remote-nolog
Avoid logging normal exceptions in remote.php
2015-08-18 15:31:26 +02:00
Robin McCorkell b4532028f9 Avoid logging normal exceptions in remote.php
When the instance needs an upgrade, or a file is not found, no logging
will occur to avoid filling up log files
2015-08-18 14:02:30 +01:00
Roeland Jago Douma 65cf4028cc Move avatarcontroller towards Node Api 2015-08-18 14:48:19 +02:00
Roeland Jago Douma 8eefc5c4e1 Move remaining setupchecks to new fomat 2015-08-18 14:42:57 +02:00
Robin McCorkell 6e47661afd Fix extracting basename from path in sharing 2015-08-18 13:41:47 +01:00