Redo export RBAC rules
This commit is contained in:
committed by
Jože Fortun
parent
7546d40ae9
commit
a1484098f0
@@ -16,7 +16,6 @@ type (
|
||||
|
||||
CanGrant bool `json:"canGrant"`
|
||||
CanUpdateChart bool `json:"canUpdateChart"`
|
||||
CanExportChart bool `json:"canExportChart"`
|
||||
CanDeleteChart bool `json:"canDeleteChart"`
|
||||
}
|
||||
|
||||
@@ -43,7 +42,6 @@ type (
|
||||
CanGrant(context.Context) bool
|
||||
|
||||
CanUpdateChart(context.Context, *types.Chart) bool
|
||||
CanExportChart(context.Context, *types.Chart) bool
|
||||
CanDeleteChart(context.Context, *types.Chart) bool
|
||||
}
|
||||
)
|
||||
@@ -156,7 +154,6 @@ func (ctrl Chart) makePayload(ctx context.Context, c *types.Chart, err error) (*
|
||||
CanGrant: ctrl.ac.CanGrant(ctx),
|
||||
|
||||
CanUpdateChart: ctrl.ac.CanUpdateChart(ctx, c),
|
||||
CanExportChart: ctrl.ac.CanExportChart(ctx, c),
|
||||
CanDeleteChart: ctrl.ac.CanDeleteChart(ctx, c),
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ type (
|
||||
Fields []*moduleFieldPayload `json:"fields"`
|
||||
|
||||
CanGrant bool `json:"canGrant"`
|
||||
CanExport bool `json:"canExport"`
|
||||
CanUpdateModule bool `json:"canUpdateModule"`
|
||||
CanDeleteModule bool `json:"canDeleteModule"`
|
||||
CanCreateRecord bool `json:"canCreateRecord"`
|
||||
@@ -48,7 +47,6 @@ type (
|
||||
moduleAccessController interface {
|
||||
CanGrant(context.Context) bool
|
||||
|
||||
CanExportModule(context.Context, *types.Module) bool
|
||||
CanUpdateModule(context.Context, *types.Module) bool
|
||||
CanDeleteModule(context.Context, *types.Module) bool
|
||||
CanCreateRecordOnModule(context.Context, *types.Module) bool
|
||||
@@ -191,8 +189,6 @@ func (ctrl Module) makePayload(ctx context.Context, m *types.Module, err error)
|
||||
|
||||
CanGrant: ctrl.ac.CanGrant(ctx),
|
||||
|
||||
CanExport: ctrl.ac.CanExportModule(ctx, m),
|
||||
|
||||
CanUpdateModule: ctrl.ac.CanUpdateModule(ctx, m),
|
||||
CanDeleteModule: ctrl.ac.CanDeleteModule(ctx, m),
|
||||
|
||||
|
||||
@@ -36,11 +36,10 @@ type (
|
||||
CanDeleteNamespace bool `json:"canDeleteNamespace"`
|
||||
CanManageNamespace bool `json:"canManageNamespace"`
|
||||
CanCreateModule bool `json:"canCreateModule"`
|
||||
CanExportModule bool `json:"canExportModule"`
|
||||
CanExportModules bool `json:"canExportModules"`
|
||||
CanCreateChart bool `json:"canCreateChart"`
|
||||
CanExportChart bool `json:"canExportChart"`
|
||||
CanExportCharts bool `json:"canExportCharts"`
|
||||
CanCreatePage bool `json:"canCreatePage"`
|
||||
CanExportPage bool `json:"canExportPage"`
|
||||
}
|
||||
|
||||
namespaceSetPayload struct {
|
||||
@@ -85,7 +84,6 @@ type (
|
||||
CanCreateChartOnNamespace(context.Context, *types.Namespace) bool
|
||||
CanExportChartsOnNamespace(context.Context, *types.Namespace) bool
|
||||
CanCreatePageOnNamespace(context.Context, *types.Namespace) bool
|
||||
CanExportPagesOnNamespace(context.Context, *types.Namespace) bool
|
||||
}
|
||||
)
|
||||
|
||||
@@ -364,12 +362,11 @@ func (ctrl Namespace) makePayload(ctx context.Context, ns *types.Namespace, err
|
||||
CanDeleteNamespace: ctrl.ac.CanDeleteNamespace(ctx, ns),
|
||||
CanManageNamespace: ctrl.ac.CanManageNamespace(ctx, ns),
|
||||
|
||||
CanCreateModule: ctrl.ac.CanCreateModuleOnNamespace(ctx, ns),
|
||||
CanExportModule: ctrl.ac.CanExportModulesOnNamespace(ctx, ns),
|
||||
CanCreateChart: ctrl.ac.CanCreateChartOnNamespace(ctx, ns),
|
||||
CanExportChart: ctrl.ac.CanExportChartsOnNamespace(ctx, ns),
|
||||
CanCreatePage: ctrl.ac.CanCreatePageOnNamespace(ctx, ns),
|
||||
CanExportPage: ctrl.ac.CanExportPagesOnNamespace(ctx, ns),
|
||||
CanCreateModule: ctrl.ac.CanCreateModuleOnNamespace(ctx, ns),
|
||||
CanExportModules: ctrl.ac.CanExportModulesOnNamespace(ctx, ns),
|
||||
CanCreateChart: ctrl.ac.CanCreateChartOnNamespace(ctx, ns),
|
||||
CanExportCharts: ctrl.ac.CanExportChartsOnNamespace(ctx, ns),
|
||||
CanCreatePage: ctrl.ac.CanCreatePageOnNamespace(ctx, ns),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ type (
|
||||
Children []*pagePayload `json:"children,omitempty"`
|
||||
|
||||
CanGrant bool `json:"canGrant"`
|
||||
CanExportPage bool `json:"canExportPage"`
|
||||
CanUpdatePage bool `json:"canUpdatePage"`
|
||||
CanDeletePage bool `json:"canDeletePage"`
|
||||
}
|
||||
@@ -61,7 +60,6 @@ type (
|
||||
CanGrant(context.Context) bool
|
||||
|
||||
CanUpdatePage(context.Context, *types.Page) bool
|
||||
CanExportPage(context.Context, *types.Page) bool
|
||||
CanDeletePage(context.Context, *types.Page) bool
|
||||
}
|
||||
)
|
||||
@@ -275,7 +273,6 @@ func (ctrl Page) makePayload(ctx context.Context, c *types.Page, err error) (*pa
|
||||
CanGrant: ctrl.ac.CanGrant(ctx),
|
||||
|
||||
CanUpdatePage: ctrl.ac.CanUpdatePage(ctx, c),
|
||||
CanExportPage: ctrl.ac.CanExportPage(ctx, c),
|
||||
CanDeletePage: ctrl.ac.CanDeletePage(ctx, c),
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user