Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Fachrat Informatik
user_wcf
Commits
2c761cce
Commit
2c761cce
authored
Jul 09, 2017
by
Fjen Undso
Browse files
initialize groupbackend seperately
parent
25702710
Changes
5
Hide whitespace changes
Inline
Side-by-side
appinfo/app.php
View file @
2c761cce
...
...
@@ -2,3 +2,6 @@
$userBackend
=
new
OCA\user_wcf\User_WCF
();
\
OC_User
::
useBackend
(
$userBackend
);
$groupBackend
=
new
OCA\user_wcf\Group_WCF
();
\
OC
::
$server
->
getGroupManager
()
->
addBackend
(
$groupBackend
);
appinfo/info.xml
View file @
2c761cce
...
...
@@ -6,9 +6,12 @@
<licence>
AGPL
</licence>
<author>
Fritz Webering
</author>
<require>
5
</require>
<
shipped>
true
</shipped
>
<
version>
1.0.0
</version
>
<types>
<type>
authentication
</type
>
<type>
prelogin
</type
>
<
authentication
/
>
<
prelogin
/
>
</types>
<dependencies>
<nextcloud
min-version=
"10"
max-version=
"20"
/>
</dependencies>
</info>
appinfo/version
deleted
100644 → 0
View file @
25702710
0.2
group_wcf.php
View file @
2c761cce
...
...
@@ -19,8 +19,11 @@ namespace OCA\user_wcf;
class
Group_WCF
extends
\
OC_Group_Backend
{
protected
$db
;
public
function
__construct
(
$wcfPath
,
$authorizedGroups
)
{
public
function
__construct
()
{
require
(
\
OC_App
::
getAppPath
(
'user_wcf'
)
.
'/config/config.php'
);
if
(
!
file_exists
(
$wcfPath
)
||
!
is_dir
(
$wcfPath
))
throw
new
\
Exception
(
'Not a valid WCF path: "'
.
$wcfPath
.
'"'
);
$this
->
db
=
lib\WCF_DB
::
getInstance
(
$wcfPath
);
$this
->
db
->
setAuthorizedGroups
(
$authorizedGroups
);
}
/**
* @brief Check if backend implements actions
...
...
user_wcf.php
View file @
2c761cce
...
...
@@ -26,9 +26,6 @@ class User_WCF extends \OC_User_Backend {
if
(
!
file_exists
(
$wcfPath
)
||
!
is_dir
(
$wcfPath
))
throw
new
\
Exception
(
'Not a valid WCF path: "'
.
$wcfPath
.
'"'
);
$this
->
db
=
lib\WCF_DB
::
getInstance
(
$wcfPath
);
$this
->
db
->
setAuthorizedGroups
(
$authorizedGroups
);
$groupBackend
=
new
Group_WCF
(
$wcfPath
,
$authorizedGroups
);
\
OC_Group
::
useBackend
(
$groupBackend
);
}
public
function
getSupportedActions
()
{
...
...
Write
Preview
Supports
Markdown
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