[WEB-5343]chore: updated view access for exports page at workspace level (#8062)
* chore: updated view access for exports page at workspace level * fix: permissions
This commit is contained in:
parent
3c6f24de64
commit
78d4356cfa
2 changed files with 4 additions and 4 deletions
|
|
@ -49,7 +49,7 @@ export const ExportForm = (props: Props) => {
|
|||
});
|
||||
// derived values
|
||||
const hasProjects = workspaceProjectIds && workspaceProjectIds.length > 0;
|
||||
const isAdmin = allowPermissions([EUserPermissions.ADMIN], EUserPermissionsLevel.WORKSPACE);
|
||||
const isMember = allowPermissions([EUserPermissions.ADMIN, EUserPermissions.MEMBER], EUserPermissionsLevel.WORKSPACE);
|
||||
const wsProjectIdsWithCreatePermisisons = projectsWithCreatePermissions
|
||||
? intersection(workspaceProjectIds, Object.keys(projectsWithCreatePermissions))
|
||||
: [];
|
||||
|
|
@ -132,7 +132,7 @@ export const ExportForm = (props: Props) => {
|
|||
<Controller
|
||||
control={control}
|
||||
name="project"
|
||||
disabled={!isAdmin && (!hasProjects || !canPerformAnyCreateAction)}
|
||||
disabled={!isMember && (!hasProjects || !canPerformAnyCreateAction)}
|
||||
render={({ field: { value, onChange } }) => (
|
||||
<CustomSearchSelect
|
||||
value={value ?? []}
|
||||
|
|
@ -165,7 +165,7 @@ export const ExportForm = (props: Props) => {
|
|||
<Controller
|
||||
control={control}
|
||||
name="provider"
|
||||
disabled={!isAdmin && (!hasProjects || !canPerformAnyCreateAction)}
|
||||
disabled={!isMember && (!hasProjects || !canPerformAnyCreateAction)}
|
||||
render={({ field: { value, onChange } }) => (
|
||||
<CustomSelect
|
||||
value={value}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ export const WORKSPACE_SETTINGS = {
|
|||
key: "export",
|
||||
i18n_label: "workspace_settings.settings.exports.title",
|
||||
href: `/settings/exports`,
|
||||
access: [EUserWorkspaceRoles.ADMIN],
|
||||
access: [EUserWorkspaceRoles.ADMIN, EUserWorkspaceRoles.MEMBER],
|
||||
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/exports/`,
|
||||
},
|
||||
webhooks: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue