mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	This also fix the bug introduces where authentication mode triggers readOnly mode in the UI.
		
			
				
	
	
		
			13 lines
		
	
	
		
			283 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			283 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 'use strict';
 | |
| 
 | |
| const User = require('../user');
 | |
| 
 | |
| function noneAuthentication(basePath = '', app) {
 | |
|     app.use(`${basePath}/api/admin/`, (req, res, next) => {
 | |
|         req.user = new User({ email: 'none@unknown.com' });
 | |
|         next();
 | |
|     });
 | |
| }
 | |
| 
 | |
| module.exports = noneAuthentication;
 |