mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	feat: add isACP to config, closes #12623
This commit is contained in:
		| @@ -94,6 +94,9 @@ get: | |||||||
|               uid: |               uid: | ||||||
|                 type: number |                 type: number | ||||||
|                 description: A user identifier |                 description: A user identifier | ||||||
|  |               isACP: | ||||||
|  |                 type: boolean | ||||||
|  |                 description: true if admin page is being loaded, false otherwise | ||||||
|               cache-buster: |               cache-buster: | ||||||
|                 type: string |                 type: string | ||||||
|               topicPostSort: |               topicPostSort: | ||||||
|   | |||||||
| @@ -67,6 +67,7 @@ apiController.loadConfig = async function (req) { | |||||||
| 		userLang: req.query.lang ? validator.escape(String(req.query.lang)) : (meta.config.defaultLang || 'en-GB'), | 		userLang: req.query.lang ? validator.escape(String(req.query.lang)) : (meta.config.defaultLang || 'en-GB'), | ||||||
| 		loggedIn: !!req.user, | 		loggedIn: !!req.user, | ||||||
| 		uid: req.uid, | 		uid: req.uid, | ||||||
|  | 		isACP: !!(req.res && req.res.locals && req.res.locals.renderAdminHeader), | ||||||
| 		'cache-buster': meta.config['cache-buster'] || '', | 		'cache-buster': meta.config['cache-buster'] || '', | ||||||
| 		topicPostSort: meta.config.topicPostSort || 'oldest_to_newest', | 		topicPostSort: meta.config.topicPostSort || 'oldest_to_newest', | ||||||
| 		categoryTopicSort: meta.config.categoryTopicSort || 'recently_replied', | 		categoryTopicSort: meta.config.categoryTopicSort || 'recently_replied', | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user