owncloud/core — pull request #8163 by Xenopathic (2014-04-11 09:08:53+00:00)
Title: Priority on external storage mounts

These changes implement the ability to set priorities on mount points. Currently `mount.json` needs to be edited manually, since I couldn't think of a decent interface on the web view (it probably needs some kind of 'advanced' section).

The idea for this is so that the administrator, who may be auto-generating `mount.json` for a large number of users, might want to put priority on the mounts used by a user who is part of multiple groups. For example, a user 'ismith' may be part of groups 'staff' and 'officestaff', as they are a member of the office staff, but a home mount for 'officestaff' should take priority over the one for 'staff', so the administrator just bumps up the priority.

This should work with existing mount configurations, and shouldn't affect the logic of setups where priorities are ignored, *with one exception*: I noticed `MOUNT_TYPE_GLOBAL` being used in `getAbsoluteMountPoints`, but couldn't find any reference to that mount type anywhere else, so in 0641266 I moved the logic for 'All Users` to be considered as part of `MOUNT_TYPE_GLOBAL`.

The default priorities, found in the backend registration, are defined as follows:

* Local - 150
* Remote mounts - 100
* Remote wrapper mounts (SMB_OC only) - 90

Needs testing:

[] Does this break your existing setup?
[] If you ignore priorities, does it work as expected?
[] Can you set priorities and see them in action?
[] Are priorities preserved when you change one of the mount configs?