Fixed post list disregarding viewPosts privilege

This commit is contained in:
Marcin Kurczewski
2014-11-22 13:10:00 +01:00
parent b14f02810e
commit 4e6fe634e1
5 changed files with 40 additions and 21 deletions

View File

@ -29,6 +29,7 @@ App.Presenters.PostListPresenter = function(
params.query = params.query || {};
privileges.canMassTag = auth.hasPrivilege(auth.privileges.massTag);
privileges.canViewPosts = auth.hasPrivilege(auth.privileges.viewPosts);
promise.wait(
util.promiseTemplate('post-list'),
@ -165,6 +166,7 @@ App.Presenters.PostListPresenter = function(
util: util,
query: params.query,
post: post,
canViewPosts: privileges.canViewPosts,
}) + '</li>');
$post.data('post', post);
util.loadImagesNicely($post.find('img'));