Skip to content

Commit

Permalink
Adjust namespace/modules/charts export rbac keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Fajfa committed Oct 3, 2024
1 parent c304601 commit af9dc80
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion client/web/compose/src/views/Admin/Charts/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
>
<b-card-header class="d-flex py-3 align-items-center border-bottom gap-1">
<export
v-if="chart.canExportChart"
v-if="namespace.canExportCharts"
slot="header"
:list="[chart]"
type="chart"
Expand Down
2 changes: 1 addition & 1 deletion client/web/compose/src/views/Admin/Charts/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
/>

<export
v-if="namespace.canExportChart"
v-if="namespace.canExportCharts"
:list="charts"
type="chart"
/>
Expand Down
2 changes: 1 addition & 1 deletion client/web/compose/src/views/Admin/Modules/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
</b-button>

<export
v-if="module.canExportModule"
v-if="namespace.canExportModules"
:list="[module]"
type="module"
class="mr-1"
Expand Down
2 changes: 1 addition & 1 deletion client/web/compose/src/views/Admin/Modules/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
/>

<export
v-if="namespace.canExportModule"
v-if="namespace.canExportModules"
:list="modules"
type="module"
/>
Expand Down
3 changes: 1 addition & 2 deletions lib/js/src/compose/types/chart/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export class BaseChart {
public canUpdateChart = false
public canDeleteChart = false
public canGrant = false
public canExportChart = false

public config: ChartConfig = {}

Expand Down Expand Up @@ -107,7 +106,7 @@ export class BaseChart {
Apply(this, c, CortezaID, 'chartID', 'namespaceID')
Apply(this, c, String, 'name', 'handle')
Apply(this, c, ISO8601Date, 'createdAt', 'updatedAt', 'deletedAt')
Apply(this, c, Boolean, 'canUpdateChart', 'canDeleteChart', 'canGrant', 'canExportChart')
Apply(this, c, Boolean, 'canUpdateChart', 'canDeleteChart', 'canGrant')
Apply(this, c, Object, 'config')

if (typeof c.config === 'object') {
Expand Down
2 changes: 0 additions & 2 deletions lib/js/src/compose/types/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ export class Module {

public canUpdateModule = false;
public canDeleteModule = false;
public canExportModule = false;
public canCreateRecord = false;
public canCreateOwnedRecord = false;
public canGrant = false;
Expand Down Expand Up @@ -251,7 +250,6 @@ export class Module {
Apply(this, m, Boolean,
'canUpdateModule',
'canDeleteModule',
'canExportModule',
'canCreateRecord',
'canCreateOwnedRecord',
'canGrant',
Expand Down
8 changes: 4 additions & 4 deletions lib/js/src/compose/types/namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export class Namespace {
public canCloneNamespace = false
public canExportNamespace = false
public canGrant = false
public canExportChart = false
public canExportModule = false
public canExportCharts = false
public canExportModules = false

constructor (i?: PartialNamespace) {
this.apply(i)
Expand Down Expand Up @@ -87,10 +87,10 @@ export class Namespace {
'canExportNamespace',
'canGrant',
'canCreateModule',
'canExportModule',
'canExportModules',
'canCreatePage',
'canCreateChart',
'canExportChart',
'canExportCharts',
)
}

Expand Down

0 comments on commit af9dc80

Please sign in to comment.