The button was showing for all users which would result in confusion when it didn't work because they lacked permission.
Currently the APIv3 Mapping.create api requires "administer CiviCRM." I don't know if that's right or if there's another
permission it ought to be checking, but at least this brings the UI in alignment with what's currently allowed.
'ang/exportui',
],
'basePages' => [],
+ 'permissions' => ['administer CiviCRM'],
'requires' => [
'crmUi',
'crmUtil',
<tr>
<td colspan="6">
<input class="crm-action-menu fa-plus crm-export-add-field" crm-ui-select="{data: getFields, placeholder: ts('Add field')}" ng-model="new.col" />
- <span ng-if="data.columns.length">
+ <span ng-if="data.columns.length && perms.admin">
<button type="button" ng-click="saveMappingDialog()" crm-icon="fa-save">
{{:: ts('Save Fields') }}
</button>
contact_type: '',
columns: []
};
+ $scope.perms = {
+ admin: CRM.checkPerm('administer CiviCRM')
+ };
// For the "add new field" dropdown
$scope.new = {col: ''};
var contactTypes = _.transform($scope.contact_types, function(result, type) {