-
Notifications
You must be signed in to change notification settings - Fork 51
Sync Master into develop #1645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync Master into develop #1645
Changes from all commits
f9cf766
4198859
26274ce
25754fe
7ca8c9a
32c1a42
ef8acb0
02d1dc4
5aaff3d
5431440
f39bef3
67d387c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,9 @@ const UpdateBillingAccount = ({ | |
isAdmin, | ||
currentBillingAccount, | ||
projectId, | ||
updateProject | ||
updateProject, | ||
isMemberOfActiveProject, | ||
isManager | ||
}) => { | ||
const [isEditing, setIsEditing] = useState(false) | ||
const [selectedBillingAccount, setSelectedBillingAccount] = useState(null) | ||
|
@@ -129,7 +131,7 @@ const UpdateBillingAccount = ({ | |
!currentBillingAccount && ( | ||
<Fragment> | ||
<span className={styles.error}>No Billing Account set</span> | ||
{isAdmin && ( | ||
{(isAdmin || (isManager && isMemberOfActiveProject)) && ( | ||
<span> | ||
{' '} | ||
({' '} | ||
|
@@ -153,7 +155,7 @@ const UpdateBillingAccount = ({ | |
> | ||
{isBillingAccountExpired ? 'INACTIVE' : 'ACTIVE'} | ||
</span>{' '} | ||
{isAdmin && ( | ||
{(isAdmin || (isManager && isMemberOfActiveProject)) && ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider extracting the condition |
||
<span> | ||
{' '} | ||
({' '} | ||
|
@@ -187,7 +189,9 @@ UpdateBillingAccount.propTypes = { | |
isBillingAccountExpired: PropTypes.bool, | ||
isAdmin: PropTypes.bool, | ||
projectId: PropTypes.number, | ||
updateProject: PropTypes.func.isRequired | ||
updateProject: PropTypes.func.isRequired, | ||
isMemberOfActiveProject: PropTypes.bool.isRequired, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
isManager: PropTypes.bool.isRequired | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
} | ||
|
||
export default UpdateBillingAccount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition
(isAdmin || (isManager && isMemberOfActiveProject))
has been added. Ensure that this logic is correct and that it reflects the intended access control. Consider whether this change could inadvertently restrict or broaden access compared to the previous conditionisAdmin
.