Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
1765c9c6
Commit
1765c9c6
authored
Apr 29, 2017
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: apply Guest modified permissions immediately
parent
05e40b6d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
admin.js
server/controllers/admin.js
+6
-0
No files found.
server/controllers/admin.js
View file @
1765c9c6
...
@@ -190,6 +190,12 @@ router.post('/users/:id', (req, res) => {
...
@@ -190,6 +190,12 @@ router.post('/users/:id', (req, res) => {
}
else
{
}
else
{
return
usr
.
save
()
return
usr
.
save
()
}
}
}).
then
((
usr
)
=>
{
// Update guest rights for future requests
if
(
usr
.
provider
===
'local'
&&
usr
.
email
===
'guest'
)
{
rights
.
guest
=
usr
}
return
usr
}).
then
(()
=>
{
}).
then
(()
=>
{
return
res
.
json
({
msg
:
'OK'
})
return
res
.
json
({
msg
:
'OK'
})
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
...
...
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