|
|
|
@ -45,12 +45,12 @@ class ResourceService extends SiteService {
|
|
|
|
|
let uniqueKey = req.ip.toString().trim().toLowerCase();
|
|
|
|
|
if (req.user) {
|
|
|
|
|
if (resourceType === 'Post') {
|
|
|
|
|
if (req.user._id === res.locals.post.author._id) {
|
|
|
|
|
if (req.user._id.equals(res.locals.post.author._id)) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (resourceType === 'Page') {
|
|
|
|
|
if (req.user._id === res.locals.page.author._id) {
|
|
|
|
|
if (req.user._id.equals(res.locals.post.author._id)) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|