Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Wolfgang Knopki
Spacedeck-open-SAML
Commits
01a6bec8
Commit
01a6bec8
authored
Apr 09, 2020
by
mntmn
Browse files
fix loading space that user is member of
parent
bdb2e9fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
models/db.js
View file @
01a6bec8
...
...
@@ -285,14 +285,14 @@ module.exports = {
}
else
{
var
findMembershipsForSpace
=
function
(
space
,
allMemberships
,
prevRole
)
{
Membership
.
findAll
({
where
:
{
"
space
"
:
space
.
_id
"
space
_id
"
:
space
.
_id
}}).
then
(
function
(
parentMemberships
)
{
var
currentMemberships
=
parentMemberships
.
concat
(
allMemberships
);
if
(
space
.
parent_space_id
)
{
Space
.
findOne
({
where
:
{
"
_id
"
:
space
.
parent_space_id
}}
,
function
(
err
,
parentSpace
)
{
}}
).
then
(
function
(
parentSpace
)
{
findMembershipsForSpace
(
parentSpace
,
currentMemberships
,
prevRole
);
});
}
else
{
...
...
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