Skip to content

Commit

Permalink
Added feature flag check for gating forms (#5459)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzparacha authored Oct 25, 2023
1 parent 05f893a commit 9693db5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { notifyError, notifySuccess } from 'controllers/app/notifications';
import { featureFlags } from 'helpers/feature-flags';
import { useCommonNavigate } from 'navigation/helpers';
import React from 'react';
import app from 'state';
Expand All @@ -16,6 +17,7 @@ const CreateCommunityGroupPage = () => {
});

if (
!featureFlags.gatingEnabled ||
!app.isLoggedIn() ||
!(Permissions.isCommunityAdmin() || Permissions.isSiteAdmin())
) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { notifyError, notifySuccess } from 'controllers/app/notifications';
import { featureFlags } from 'helpers/feature-flags';
import Group from 'models/Group';
import { useCommonNavigate } from 'navigation/helpers';
import React, { useState } from 'react';
Expand Down Expand Up @@ -32,6 +33,7 @@ const UpdateCommunityGroupPage = ({ groupId }: { groupId: string }) => {
const foundGroup: Group = groups.find((x) => x.id === parseInt(`${groupId}`));

if (
!featureFlags.gatingEnabled ||
!app.isLoggedIn() ||
!(Permissions.isCommunityAdmin() || Permissions.isSiteAdmin())
) {
Expand Down

0 comments on commit 9693db5

Please sign in to comment.