Add mount configuration priority information

This commit is contained in:
Robin McCorkell
2014-05-09 21:35:26 +01:00
parent 48577b9dff
commit 062be2ba99

View File

@@ -44,7 +44,8 @@ Example
"admin":{
"\/$user\/files\/Admin_Stuff":{
"class":"\\OC\\Files\\Storage\\Local",
"options":{ ... }
"options":{ ... },
"priority":150
}
}
}
@@ -52,18 +53,42 @@ Example
"all":{
"\/$user\/files\/Pictures":{
"class":"\\OC\\Files\\Storage\\DAV",
"options":{ ... }
"options":{ ... },
"priority":100
}
}
"someuser":{
"\/someuser\/files\/Music":{
"class":"\\OC\\Files\\Storage\\FTP",
"options":{ ... }
"options":{ ... },
"priority":100
}
}
}
}
Priorities
----------
An advanced feature is available, only configurable directly in
:file:`data/mount.json`, which allows mount configurations to have an associated
priority. This priority is compared when two or more valid mount configurations
with the same mount point are considered. A higher priority will 'win', and
become the active mount for the user.
Each backend has a default priority, assigned when a mount configuration with that
backend is created. The default priority will be shown in the example section for
each backend below.
There is also a concept of priority types, to preserve compatibility with
previous mount configuration parsing. Mount configurations are evaluated in the
following order, with later mount types always overriding a previous mount type:
- user -> all : global mount configurations
- group : group mount configurations
- user (not all) : per-user mount configurations
- :file:`data/$user/mount.json` : personal mount configurations
Backends
--------
@@ -83,7 +108,8 @@ Example
.. code-block:: json
{ "class":"\\OC\\Files\\Storage\\Local",
"options":{ "datadir":"\/mnt\/additional_storage" }
"options":{ "datadir":"\/mnt\/additional_storage" },
"priority":150
}
.. note:: You must ensure that the web server has sufficient permissions on the folder.
@@ -117,7 +143,8 @@ Example
"password":"secret",
"root":"\/Videos",
"secure":"false"
}
},
"priority":100
}
.. note:: PHP needs to be build with FTP support for this backend to work.
@@ -148,7 +175,8 @@ Example
"user":"johndoe",
"password":"secret",
"root":"\/Books"
}
},
"priority":100
}
.. note:: PHP needs to be build with SFTP support for this backend to work.
@@ -181,7 +209,8 @@ Example
"password":"secret",
"share":"\/test",
"root":"\/Pictures"
}
},
"priority":100
}
WebDAV
@@ -212,7 +241,8 @@ Example
"user":"johndoe",
"password":"secret",
"secure":"true"
}
},
"priority":100
}
Amazon S3
@@ -238,7 +268,8 @@ Example
"key":"key",
"secret":"secret",
"bucket":"bucket"
}
},
"priority":100
}
Dropbox
@@ -267,7 +298,8 @@ Example
"app_secret":"secret",
"token":"#token",
"token_secret":"#token_secret"
}
},
"priority":100
}
Google Drive
@@ -296,7 +328,8 @@ Example
"client_id":"#client_id",
"client_secret":"#client_secret",
"token":"#token"
}
},
"priority":100
}
OpenStack Swift
@@ -328,7 +361,8 @@ Example
"token":"secret",
"root":"\/Videos",
"secure":"true"
}
},
"priority":100
}