Skip to content

Commit

Permalink
Show component properties to users with VIEW_PORTFOLIO permission
Browse files Browse the repository at this point in the history
Previously the button to `Properties` in the component details modal was
not shown to users not having the `PORTFOLIO_EDIT` permission.

With this change Users with the `VIEW_PORTFOLIO` permission can see the
properties.

Signed-off-by: Maximilian Wirtz <[email protected]>
  • Loading branch information
Shortfinga committed Nov 27, 2024
1 parent cb43fef commit 1f73d1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/portfolio/projects/ComponentDetailsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
size="md"
variant="outline-primary"
v-b-modal.componentPropertiesModal
v-permission="PERMISSIONS.PORTFOLIO_MANAGEMENT"
v-permission="PERMISSIONS.VIEW_PORTFOLIO"
>{{ $t('message.properties') }}</b-button
>
<b-button size="md" variant="secondary" @click="cancel()">{{
Expand Down
4 changes: 4 additions & 0 deletions src/views/portfolio/projects/ComponentPropertiesModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
size="md"
variant="outline-danger"
@click="deleteProperty"
v-permission="PERMISSIONS.PORTFOLIO_MANAGEMENT"
:disabled="!hasRowsSelected"
>{{ $t('message.delete') }}</b-button
>
Expand All @@ -29,6 +30,7 @@
<b-button
size="md"
variant="primary"
v-permission="PERMISSIONS.PORTFOLIO_MANAGEMENT"
v-b-modal.componentCreatePropertyModal
>{{ $t('message.create_property') }}</b-button
>
Expand All @@ -39,9 +41,11 @@
<script>
import common from '../../../shared/common';
import xssFilters from 'xss-filters';
import permissionsMixin from '../../../mixins/permissionsMixin';
export default {
name: 'ComponentPropertiesModal',
mixins: [permissionsMixin],
props: {
uuid: String,
},
Expand Down

0 comments on commit 1f73d1e

Please sign in to comment.