Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
7542bdd9
Commit
7542bdd9
authored
Dec 23, 2016
by
Vincent Petry
Committed by
GitHub
Dec 23, 2016
Browse files
Merge pull request #26867 from owncloud/testing-altbackend-switch
Testing app switch to force-enable test user backend
parents
6c539a2e
2ab1d812
Changes
2
Hide whitespace changes
Inline
Side-by-side
apps/testing/appinfo/info.xml
View file @
7542bdd9
...
...
@@ -10,6 +10,6 @@
<owncloud
min-version=
"9.2"
max-version=
"9.2"
/>
</dependencies>
<types>
<
type>
prelogin
</type
>
<
authentication/
>
</types>
</info>
apps/testing/lib/Application.php
View file @
7542bdd9
...
...
@@ -22,9 +22,21 @@
namespace
OCA\Testing
;
use
OCP\AppFramework\App
;
use
OCA\Testing\AlternativeHomeUserBackend
;
class
Application
extends
App
{
public
function
__construct
(
array
$urlParams
=
array
())
{
parent
::
__construct
(
'testing'
,
$urlParams
);
$appName
=
'testing'
;
parent
::
__construct
(
$appName
,
$urlParams
);
$c
=
$this
->
getContainer
();
$config
=
$c
->
getServer
()
->
getConfig
();
if
(
$config
->
getAppValue
(
$appName
,
'enable_alt_user_backend'
,
'no'
)
===
'yes'
)
{
$userManager
=
$c
->
getServer
()
->
getUserManager
();
// replace all user backends with this one
$userManager
->
clearBackends
();
$userManager
->
registerBackend
(
$c
->
query
(
AlternativeHomeUserBackend
::
class
));
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment