imports/vx/both/code/util.js
/**
     * Return the list of authorized report definitions filtered by available role.
     *
     * @param {object} user User to test.
     * @return {array} Array of report definition objects.
     */
Return the list of authorized report definitions filtered by available role.
@param {object} user User to test.
@return {array} Array of report definition objects.
Return the list of authorized report definitions filtered by available role . @param { object } user User to test . @return { array } Array of report definition objects .
makeReportDefinitionObjects(user) {
        let reportDefinitionObjects = []
        for (let reportType in Meteor.i18nMessages.codes.reportType) {
            if (!Util.isAuthorizedReportType(user, reportType)) {
                continue
            }
            let reportDefinitionObject = {}
            reportDefinitionObject.reportType = reportType
            reportDefinitionObject.description = Util.i18n("codes.reportType." + reportType)
            reportDefinitionObjects.push(reportDefinitionObject)
        }
        return reportDefinitionObjects
    }
makeReportDefinitionObjects ( user ) { let reportDefinitionObjects = [ ] for ( let reportType in Meteor . i18nMessages . codes . reportType ) { if ( ! Util . isAuthorizedReportType ( user , reportType ) ) { continue } let reportDefinitionObject = { } reportDefinitionObject . reportType = reportType reportDefinitionObject . description = Util . i18n ( "codes.reportType." + reportType ) reportDefinitionObjects . push ( reportDefinitionObject ) } return reportDefinitionObjects }
Return the list of authorized report definitions filtered by available role.
Return the list of authorized report definitions filtered by available role .