mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-01 02:08:58 +02:00
fix(torrents): torrent policy access check
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user