removed move button from main post, disable moving main post, fixed
moving posts.
This commit is contained in:
barisusakli
2014-06-23 18:06:59 -04:00
parent 9af12819e3
commit bd4722665d
6 changed files with 24 additions and 20 deletions

View File

@@ -79,7 +79,12 @@ module.exports = function(privileges) {
};
privileges.posts.canMove = function(pid, uid, callback) {
isAdminOrMod(pid, uid, callback);
posts.isMain(pid, function(err, isMain) {
if (err || isMain) {
return callback(err || new Error('[[error:cant-move-mainpost]]'));
}
isAdminOrMod(pid, uid, callback);
});
};
function isAdminOrMod(pid, uid, callback) {