Skip to content

Commit

Permalink
feat: remove alpha control for advanced permission control
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Sep 15, 2023
1 parent d7a39b6 commit 650f350
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions client/web/src/components/modals/GroupPanel/ModifyGroupPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,31 +65,29 @@ export const ModalModifyGroupPanel: React.FC<{
onSubmit={handleSubmit}
extraProps={{
suffixElement: (
<AlphaContainer>
<CollapseView title={t('高级权限控制')} className="mb-2">
<AdvanceGroupPanelPermission
height={320}
groupId={props.groupId}
panelId={props.groupPanelId}
onChange={(permissionMap) => {
if (permissionMap) {
const fallbackPermissions = permissionMap[ALL_PERMISSION];
const others = { ...permissionMap };
<CollapseView title={t('高级权限控制')} className="mb-2">
<AdvanceGroupPanelPermission
height={320}
groupId={props.groupId}
panelId={props.groupPanelId}
onChange={(permissionMap) => {
if (permissionMap) {
const fallbackPermissions = permissionMap[ALL_PERMISSION];
const others = { ...permissionMap };

handleUpdateValues({
fallbackPermissions,
permissionMap: _omit(others, [ALL_PERMISSION]),
});
} else {
handleUpdateValues({
fallbackPermissions: undefined,
permissionMap: undefined,
});
}
}}
/>
</CollapseView>
</AlphaContainer>
handleUpdateValues({
fallbackPermissions,
permissionMap: _omit(others, [ALL_PERMISSION]),
});
} else {
handleUpdateValues({
fallbackPermissions: undefined,
permissionMap: undefined,
});
}
}}
/>
</CollapseView>
),
}}
/>
Expand Down

0 comments on commit 650f350

Please sign in to comment.