Skip to content

Commit

Permalink
fix: identity overrides only called once (#5145)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoapolo authored Feb 20, 2025
1 parent 690f87c commit 8621b26
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions frontend/web/components/modals/CreateFlag.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ const CreateFlag = class extends Component {
}
const { allowEditDescription } = this.props
const hideTags = this.props.hideTags || []

if (this.props.projectFlag) {
this.userOverridesPage(1)
this.userOverridesPage(1, true)
}
this.state = {
allowEditDescription,
Expand Down Expand Up @@ -224,14 +225,18 @@ const CreateFlag = class extends Component {
}
}

userOverridesPage = (page) => {
userOverridesPage = (page, forceRefetch) => {
if (Utils.getIsEdge()) {
if (!Utils.getShouldHideIdentityOverridesTab(ProjectStore.model)) {
getPermission(getStore(), {
id: this.props.environmentId,
level: 'environment',
permissions: 'VIEW_IDENTITIES',
}).then((permissions) => {
getPermission(
getStore(),
{
id: this.props.environmentId,
level: 'environment',
permissions: 'VIEW_IDENTITIES',
},
{ forceRefetch },
).then((permissions) => {
if (permissions?.length) {
data
.get(
Expand Down

0 comments on commit 8621b26

Please sign in to comment.