mirror of
https://github.com/strapi/strapi.git
synced 2025-07-17 14:02:21 +00:00
15 lines
314 B
JavaScript
15 lines
314 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,
|
|
};
|