Skip to content

Commit

Permalink
Filter out personal policies in room page
Browse files Browse the repository at this point in the history
  • Loading branch information
iwiznia committed Feb 2, 2024
1 parent 60b08c1 commit 18796cc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/pages/workspace/WorkspaceNewRoomPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,14 @@ function WorkspaceNewRoomPage(props) {

const workspaceOptions = useMemo(
() =>
_.map(PolicyUtils.getActivePolicies(props.policies), (policy) => ({
label: policy.name,
key: policy.id,
value: policy.id,
})),
_.map(
_.filter(PolicyUtils.getActivePolicies(props.policies), (policy) => policy.type !== CONST.POLICY.TYPE.PERSONAL),
(policy) => ({
label: policy.name,
key: policy.id,
value: policy.id,
}),
),
[props.policies],
);
const [policyID, setPolicyID] = useState(() => {
Expand Down

0 comments on commit 18796cc

Please sign in to comment.