fix(torrents): torrent policy access check

This commit is contained in:
OldHawk
2017-06-13 14:32:48 +08:00
parent 641bbdffb8
commit 38899c9c0b

View File

@@ -80,11 +80,6 @@ exports.invokeRolesPolicies = function () {
exports.isAllowed = function (req, res, next) {
var roles = (req.user) ? req.user.roles : ['guest'];
// If an article is being processed and the current user created it then allow any manipulation
if (req.article && req.user && req.article.user && req.article.user.id === req.user.id) {
return next();
}
// Check for user roles
acl.areAnyRolesAllowed(roles, req.route.path, req.method.toLowerCase(), function (err, isAllowed) {
if (err) {