|
24 | 24 | import bootstrapTableMixin from "../../../mixins/bootstrapTableMixin"; |
25 | 25 | import xssFilters from "xss-filters"; |
26 | 26 | import i18n from "../../../i18n"; |
| 27 | + import permissionsMixin from "../../../mixins/permissionsMixin"; |
27 | 28 | import BootstrapToggle from 'vue-bootstrap-toggle'; |
28 | 29 |
|
29 | 30 | export default { |
|
183 | 184 | <b-form-group id="fieldset-7" :label="this.$t('message.audit_trail')" label-for="auditTrailField"> |
184 | 185 | <b-form-textarea id="auditTrailField" v-model="auditTrail" rows="7" class="form-control disabled" readonly trim /> |
185 | 186 | </b-form-group> |
186 | | - <b-form-group id="fieldset-8" :label="this.$t('message.comment')" label-for="input-8"> |
| 187 | + <b-form-group id="fieldset-8" v-if="this.isPermitted(this.PERMISSIONS.VULNERABILITY_ANALYSIS)" :label="this.$t('message.comment')" label-for="input-8"> |
187 | 188 | <b-form-textarea id="input-8" v-model="comment" rows="4" class="form-control" trim /> |
188 | 189 | <div class="pull-right"> |
189 | 190 | <b-button size="sm" variant="outline-primary" @click="addComment"><span class="fa fa-comment-o"></span> Add Comment</b-button> |
190 | 191 | </div> |
191 | 192 | </b-form-group> |
192 | | - <b-form-group id="fieldset-9" :label="this.$t('message.analysis')" label-for="input-9"> |
193 | | - <b-input-group id="input-9"> |
194 | | - <b-form-select v-model="analysisState" :options="analysisChoices" @change="makeAnalysis" style="flex:0 1 auto; width:auto; margin-right:2rem;"/> |
195 | | - <bootstrap-toggle v-model="isSuppressed" :options="{ on: 'Suppressed', off: 'Suppress', onstyle: 'warning', offstyle: 'outline-disabled'}" :disabled="false" /> |
196 | | - </b-input-group> |
| 193 | + <b-form-group id="fieldset-9" v-if="this.isPermitted(this.PERMISSIONS.VULNERABILITY_ANALYSIS)" :label="this.$t('message.analysis')" label-for="input-9"> |
| 194 | + <b-input-group id="input-9"> |
| 195 | + <b-form-select v-model="analysisState" :options="analysisChoices" @change="makeAnalysis" style="flex:0 1 auto; width:auto; margin-right:2rem;"/> |
| 196 | + <bootstrap-toggle v-model="isSuppressed" :options="{ on: 'Suppressed', off: 'Suppress', onstyle: 'warning', offstyle: 'outline-disabled'}" :disabled="false" /> |
| 197 | + </b-input-group> |
197 | 198 | </b-form-group> |
198 | | - <b-row> |
| 199 | + <b-row v-if="this.isPermitted(this.PERMISSIONS.VULNERABILITY_ANALYSIS)"> |
199 | 200 | <b-col sm="6"> |
200 | 201 | <b-form-group id="fieldset-10" :label="this.$t('message.justification')" label-for="input-10"> |
201 | 202 | <b-input-group id="input-10"> |
|
211 | 212 | </b-form-group> |
212 | 213 | </b-col> |
213 | 214 | </b-row> |
214 | | - <b-form-group id="fieldset-12" :label="this.$t('message.details')" label-for="analysisDetailsField"> |
| 215 | + <b-form-group id="fieldset-12" v-if="this.isPermitted(this.PERMISSIONS.VULNERABILITY_ANALYSIS)" :label="this.$t('message.details')" label-for="analysisDetailsField"> |
215 | 216 | <b-form-textarea id="analysisDetailsField" v-model="analysisDetails" rows="7" class="form-control" |
216 | 217 | v-debounce:750ms="makeAnalysis" :debounce-events="'keyup'"/> |
217 | 218 | </b-form-group> |
|
266 | 267 | } |
267 | 268 | } |
268 | 269 | }, |
| 270 | + mixins: [permissionsMixin], |
269 | 271 | methods: { |
270 | 272 | getAnalysis: function() { |
271 | 273 | let queryString = "?project=" + projectUuid + "&component=" + this.finding.component.uuid + "&vulnerability=" + this.finding.vulnerability.uuid; |
|
0 commit comments