mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-03 19:36:20 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			316 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			316 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
'use strict';
 | 
						|
 | 
						|
const { isString } = require('lodash/fp');
 | 
						|
const { getService } = require('../utils');
 | 
						|
 | 
						|
const isValidCondition = (condition) => {
 | 
						|
  const { conditionProvider } = getService('permission');
 | 
						|
 | 
						|
  return isString(condition) && conditionProvider.has(condition);
 | 
						|
};
 | 
						|
 | 
						|
module.exports = {
 | 
						|
  isValidCondition,
 | 
						|
};
 |