|
@@ 202-228 (lines=27) @@
|
| 199 |
|
} |
| 200 |
|
} |
| 201 |
|
// Group mount points |
| 202 |
|
if (isset($mountConfig[self::MOUNT_TYPE_GROUP])) { |
| 203 |
|
foreach ($mountConfig[self::MOUNT_TYPE_GROUP] as $group => $mounts) { |
| 204 |
|
if (\OC_Group::inGroup($user, $group)) { |
| 205 |
|
foreach ($mounts as $mountPoint => $options) { |
| 206 |
|
$mountPoint = self::setUserVars($user, $mountPoint); |
| 207 |
|
foreach ($options as &$option) { |
| 208 |
|
$option = self::setUserVars($user, $option); |
| 209 |
|
} |
| 210 |
|
$options['personal'] = false; |
| 211 |
|
$options['options'] = self::decryptPasswords($options['options']); |
| 212 |
|
if (!isset($options['priority'])) { |
| 213 |
|
$options['priority'] = $backends[$options['class']]['priority']; |
| 214 |
|
} |
| 215 |
|
|
| 216 |
|
// Override if priority greater or if priority type different |
| 217 |
|
if ((!isset($mountPoints[$mountPoint])) |
| 218 |
|
|| ($options['priority'] >= $mountPoints[$mountPoint]['priority']) |
| 219 |
|
|| ($mountPoints[$mountPoint]['priority_type'] !== self::MOUNT_TYPE_GROUP) |
| 220 |
|
) { |
| 221 |
|
$options['priority_type'] = self::MOUNT_TYPE_GROUP; |
| 222 |
|
$options['backend'] = $backends[$options['class']]['backend']; |
| 223 |
|
$mountPoints[$mountPoint] = $options; |
| 224 |
|
} |
| 225 |
|
} |
| 226 |
|
} |
| 227 |
|
} |
| 228 |
|
} |
| 229 |
|
// User mount points |
| 230 |
|
if (isset($mountConfig[self::MOUNT_TYPE_USER])) { |
| 231 |
|
foreach ($mountConfig[self::MOUNT_TYPE_USER] as $mountUser => $mounts) { |
|
@@ 230-256 (lines=27) @@
|
| 227 |
|
} |
| 228 |
|
} |
| 229 |
|
// User mount points |
| 230 |
|
if (isset($mountConfig[self::MOUNT_TYPE_USER])) { |
| 231 |
|
foreach ($mountConfig[self::MOUNT_TYPE_USER] as $mountUser => $mounts) { |
| 232 |
|
if (strtolower($mountUser) === strtolower($user)) { |
| 233 |
|
foreach ($mounts as $mountPoint => $options) { |
| 234 |
|
$mountPoint = self::setUserVars($user, $mountPoint); |
| 235 |
|
foreach ($options as &$option) { |
| 236 |
|
$option = self::setUserVars($user, $option); |
| 237 |
|
} |
| 238 |
|
$options['personal'] = false; |
| 239 |
|
$options['options'] = self::decryptPasswords($options['options']); |
| 240 |
|
if (!isset($options['priority'])) { |
| 241 |
|
$options['priority'] = $backends[$options['class']]['priority']; |
| 242 |
|
} |
| 243 |
|
|
| 244 |
|
// Override if priority greater or if priority type different |
| 245 |
|
if ((!isset($mountPoints[$mountPoint])) |
| 246 |
|
|| ($options['priority'] >= $mountPoints[$mountPoint]['priority']) |
| 247 |
|
|| ($mountPoints[$mountPoint]['priority_type'] !== self::MOUNT_TYPE_USER) |
| 248 |
|
) { |
| 249 |
|
$options['priority_type'] = self::MOUNT_TYPE_USER; |
| 250 |
|
$options['backend'] = $backends[$options['class']]['backend']; |
| 251 |
|
$mountPoints[$mountPoint] = $options; |
| 252 |
|
} |
| 253 |
|
} |
| 254 |
|
} |
| 255 |
|
} |
| 256 |
|
} |
| 257 |
|
|
| 258 |
|
$personalBackends = self::getPersonalBackends(); |
| 259 |
|
|