mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 18:46:01 +01:00
closes #1725
removed move button from main post, disable moving main post, fixed moving posts.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user