mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	exposing thread tools to users in the "administrators" set, fixing up
Topics methods to call the "editable" method first instead of just checking rep thresholds. Also changed the limit on thread length from 10 to infinity (for now, until infinite scrolling makes it in)
This commit is contained in:
		
							
								
								
									
										10
									
								
								src/user.js
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/user.js
									
									
									
									
									
								
							| @@ -264,7 +264,7 @@ var config = require('../config.js'), | ||||
|  | ||||
| 		User.exists(username, function(exists) { | ||||
| 			RDB.incr('global:next_user_id', function(err, uid) { | ||||
| 				RDB.handle(err); | ||||
| 				RDB.handfle(err); | ||||
|  | ||||
| 				var gravatar = User.createGravatarURLFromEmail(email); | ||||
|  | ||||
| @@ -524,7 +524,13 @@ var config = require('../config.js'), | ||||
|  | ||||
| 	User.isModerator = function(uid, cid, callback) { | ||||
| 		RDB.sismember('cid:' + cid + ':moderators', uid, function(err, exists) { | ||||
| 			callback(exists); | ||||
| 			callback(!!exists); | ||||
| 		}); | ||||
| 	} | ||||
|  | ||||
| 	User.isAdministrator = function(uid, callback) { | ||||
| 		RDB.sismember('administrators', uid, function(err, exists) { | ||||
| 			callback(!!exists); | ||||
| 		}); | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user