From 45daa70089daaa982679f546a28d0bf486eedda0 Mon Sep 17 00:00:00 2001 From: shanshuirenjia <978987373@qq.com> Date: Sun, 5 May 2019 12:00:41 +0800 Subject: [PATCH 1/3] repair new department bug --- frontend/src/pages/groups/group-view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/groups/group-view.js b/frontend/src/pages/groups/group-view.js index dbc3a1f475..0475addec1 100644 --- a/frontend/src/pages/groups/group-view.js +++ b/frontend/src/pages/groups/group-view.js @@ -353,7 +353,7 @@ class GroupView extends React.Component { } render() { - let { errMessage, emptyTip, currentGroup } = this.state; + let { errMessage, emptyTip, currentGroup, isDepartmentGroup, isStaff } = this.state; let isShowSettingIcon = !(currentGroup && currentGroup.parent_group_id !== 0 && currentGroup.admins.indexOf(username) === -1); let that = this; return ( @@ -374,7 +374,7 @@ class GroupView extends React.Component {
- {currentGroup && ( + {((!isDepartmentGroup && currentGroup) || (isDepartmentGroup && isStaff)) && (
this.onTabNavClick('groups')}>{gettext('Groups')} From f4d048f16e0f77ee8462c65f796723ff587f7b6c Mon Sep 17 00:00:00 2001 From: shanshuirenjia <978987373@qq.com> Date: Sun, 5 May 2019 13:16:32 +0800 Subject: [PATCH 2/3] repair code error --- frontend/src/pages/groups/group-view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/groups/group-view.js b/frontend/src/pages/groups/group-view.js index 0475addec1..e3aa6021a7 100644 --- a/frontend/src/pages/groups/group-view.js +++ b/frontend/src/pages/groups/group-view.js @@ -362,7 +362,7 @@ class GroupView extends React.Component {
- {canAddRepo && ( + {((!isDepartmentGroup && currentGroup) || (isDepartmentGroup && isStaff)) && ( @@ -374,7 +374,7 @@ class GroupView extends React.Component {
- {((!isDepartmentGroup && currentGroup) || (isDepartmentGroup && isStaff)) && ( + {currentGroup && (
this.onTabNavClick('groups')}>{gettext('Groups')} From d70bb961953113445a057fa25ba666eabdf590ed Mon Sep 17 00:00:00 2001 From: shanshuirenjia <978987373@qq.com> Date: Sun, 5 May 2019 13:25:02 +0800 Subject: [PATCH 3/3] repair code error --- frontend/src/pages/groups/group-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/groups/group-view.js b/frontend/src/pages/groups/group-view.js index e3aa6021a7..9a7bc151f2 100644 --- a/frontend/src/pages/groups/group-view.js +++ b/frontend/src/pages/groups/group-view.js @@ -362,7 +362,7 @@ class GroupView extends React.Component {
- {((!isDepartmentGroup && currentGroup) || (isDepartmentGroup && isStaff)) && ( + {((!isDepartmentGroup && canAddRepo) || (isDepartmentGroup && isStaff)) && (