Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFlashAccount committed Aug 19, 2024
1 parent f388bec commit 0553109
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions app/dashboard/src/pages/authentication/Setup/Setup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,14 @@ const BASE_STEPS: Step[] = [
{
title: 'setOrgNameTitle',
text: 'setOrgNameDescription',
ignore: (context) => context.plan === Plan.free || context.plan === Plan.solo,
ignore: (context) => {
const isOrganizationAdmin =
context.session && 'user' in context.session ?
context.session.user.isOrganizationAdmin
: false

return (context.plan === Plan.free || context.plan === Plan.solo) && !isOrganizationAdmin
},
hideNext: true,
hidePrevious: true,
/**
Expand Down Expand Up @@ -187,7 +194,14 @@ const BASE_STEPS: Step[] = [
{
title: 'inviteUsers',
text: 'inviteUsersDescription',
ignore: (context) => context.plan === Plan.free || context.plan === Plan.solo,
ignore: (context) => {
const isOrganizationAdmin =
context.session && 'user' in context.session ?
context.session.user.isOrganizationAdmin
: false

return (context.plan === Plan.free || context.plan === Plan.solo) && !isOrganizationAdmin
},
hideNext: true,
hidePrevious: true,
/**
Expand Down Expand Up @@ -220,7 +234,14 @@ const BASE_STEPS: Step[] = [
{
title: 'setDefaultUserGroup',
text: 'setDefaultUserGroupDescription',
ignore: (context) => context.plan === Plan.free || context.plan === Plan.solo,
ignore: (context) => {
const isOrganizationAdmin =
context.session && 'user' in context.session ?
context.session.user.isOrganizationAdmin
: false

return (context.plan === Plan.free || context.plan === Plan.solo) && !isOrganizationAdmin
},
hideNext: true,
hidePrevious: true,
/**
Expand Down

0 comments on commit 0553109

Please sign in to comment.