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
die_coolen_jungs
our_own_cloud_project
Commits
b262c30f
Commit
b262c30f
authored
Mar 24, 2015
by
Joas Schilling
Browse files
Correctly get array of groups and send OCP\IGroup objects to enable method
parent
9cb07f12
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/private/app.php
View file @
b262c30f
...
...
@@ -269,7 +269,15 @@ class OC_App {
$appManager
=
\
OC
::
$server
->
getAppManager
();
if
(
!
is_null
(
$groups
))
{
$appManager
->
enableAppForGroups
(
$app
,
$groups
);
$groupManager
=
\
OC
::
$server
->
getGroupManager
();
$groupsList
=
[];
foreach
(
$groups
as
$group
)
{
$groupItem
=
$groupManager
->
get
(
$group
);
if
(
$groupItem
instanceof
\
OCP\IGroup
)
{
$groupsList
[]
=
$groupManager
->
get
(
$group
);
}
}
$appManager
->
enableAppForGroups
(
$app
,
$groupsList
);
}
else
{
$appManager
->
enableApp
(
$app
);
}
...
...
settings/js/apps.js
View file @
b262c30f
...
...
@@ -406,7 +406,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
var
element
=
$
(
this
).
parent
().
find
(
'
input.enable
'
);
var
groups
=
$
(
this
).
val
();
if
(
groups
&&
groups
!==
''
)
{
groups
=
groups
.
split
(
'
,
'
);
groups
=
groups
.
split
(
'
|
'
);
}
else
{
groups
=
[];
}
...
...
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