Skip to content

Commit

Permalink
feat:用户个人视角 权限管理优化 TencentBlueKing#11138
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 26284
  • Loading branch information
useryuyu committed Dec 10, 2024
1 parent 8a9d1d6 commit 04d0f18
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function shouldShowOverlay(row) {
case 'renewal':
return row.expiredAtDisplay === t('永久') || row.removeMemberButtonControl === 'TEMPLATE';
case 'handover':
return row.removeMemberButtonControl === 'TEMPLATE' || row.isExpired;
return row.removeMemberButtonControl === 'TEMPLATE' || row.removeMemberButtonControl === 'DEPARTMENT' || row.isExpired;
case 'remove':
return row.removeMemberButtonControl !== 'OTHER';
default:
Expand All @@ -244,11 +244,11 @@ function getUnableMessage(row) {
case 'handover':
if (row.removeMemberButtonControl === 'TEMPLATE') {
return t('通过用户组获得权限,请到用户组里移出用户');
} else if (row.isExpired) {
return t('已过期,无需移交')
} else if (row.removeMemberButtonControl === 'DEPARTMENT') {
return t('通过组织加入的 不允许 续期/移出/移交');
}
} else if (row.isExpired) {
return t('已过期,无需移交')
}
case 'remove':
let message = TOOLTIPS_CONTENT[row.removeMemberButtonControl];
return message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@
v-if="authorizationInvalid && batchFlag === 'handover'"
class="main-text"
>
<i18n-t keypath="移交以上用户组,将导致X资源授权失效。请确认是否同步移交流水线权限代持人" tag="div">
<span class="remove-num">{{ authorizationInvalid }}</span><span class="font-weight">{{ t("流水线权限代持人") }}</span>
<i18n-t keypath="移交以上用户组,将导致流水线权限代持失效。请确认是否同步移交授权" tag="div">
<span class="remove-num">{{ authorizationInvalid }}</span>
</i18n-t>
</p>

Expand All @@ -251,15 +251,15 @@
v-if="authorizationInvalid"
class="main-text"
>
<i18n-t keypath="退出以上用户组,将导致X资源授权失效,X个资源没有拥有者。查看详情, 请填写交接人,完成交接后才能成功退出。" tag="div">
<i18n-t keypath="退出以上用户组,将导致X流水线权限代持失效,X个资源没有拥有者。查看详情, 请填写交接人,完成交接后才能成功退出。" tag="div">
<template #op>
<span class="remove-num">{{ authorizationInvalid }}</span>
</template>
<template #op1>
<span class="remove-person">{{ checkData.uniqueManagerCount }}</span>
<span class="remove-num">{{ checkData.uniqueManagerCount }}</span>
</template>
<template #op2>
<span class="remove-person remove-detail text-blue" @click="handleDetail">{{ t("查看详情") }}</span>
<span class="remove-num remove-detail" @click="handleDetail">{{ t("查看详情") }}</span>
</template>
</i18n-t>
</p>
Expand Down Expand Up @@ -1161,22 +1161,16 @@ function goBack() {
color: #63656e;
font-size: 16px;
.remove-num {
color: #3a84ff;
font-size: 16px;
font-weight: 700;
}
.remove-person {
color: #63656e;
font-size: 16px;
font-weight: 700;
}
}
}
.font-weight {
color: #4D4F56;
.remove-num {
color: #3a84ff;
font-size: 14px;
font-weight: 700;
}
Expand Down
5 changes: 2 additions & 3 deletions src/frontend/locale/permission/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,8 @@
";其中X个用户组X,本次操作将忽略": "; {0} of which {1}, will be ignored in this operation",
"无法移出": "Cannot remove",
"确认退出以上X个用户组吗?": "Are you sure you want to exit the above {0} user groups?",
"移交以上用户组,将导致X资源授权失效。请确认是否同步移交流水线权限代持人。": "Transferring the above user groups will cause {0} resource authorizations to become invalid. Please confirm whether to also transfer {1}.",
"退出以上用户组,将导致X资源授权失效,X个资源没有拥有者。查看详情, 请填写交接人,完成交接后才能成功退出。": "Exiting the above user groups will cause {op} resource authorizations to become invalid, and {op1} resources will have no owner. {op2}, please fill in the transferee and complete the transfer before successfully exiting.",
"流水线权限代持人": "Pipeline Permission Proxy",
"移交以上用户组,将导致 {0} 流水线权限代持失效。请确认是否同步移交授权。": "Transferring the above user group will cause the delegation of permissions for {0} pipelines to become invalid. Please confirm whether to transfer the authorization as well.",
"退出以上用户组,将导致 {op} 流水线权限代持失效,{op1} 个资源没有拥有者。{op2}, 请填写交接人,完成交接后才能成功退出。": "Exiting the above user group will cause the delegation of permissions for {op} pipelines to become invalid, and {op1} resources to have no owner. {op2}, please specify a transferee, and complete the transfer before successfully exiting.",
"确定续期": "Confirm Renewal",
"确定移交": "Confirm Transfer",
"确定退出": "Confirm Exit",
Expand Down
5 changes: 2 additions & 3 deletions src/frontend/locale/permission/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,8 @@
";其中X个用户组X,本次操作将忽略": ";其中{0}个用户组{1},本次操作将忽略",
"无法移出": "无法移出",
"确认退出以上X个用户组吗?": "确认退出以上 {0} 个用户组吗?",
"移交以上用户组,将导致X资源授权失效。请确认是否同步移交流水线权限代持人。": "移交以上用户组,将导致 {0} 资源授权失效。请确认是否同步移交{1}。",
"退出以上用户组,将导致X资源授权失效,X个资源没有拥有者。查看详情, 请填写交接人,完成交接后才能成功退出。": "退出以上用户组,将导致 {op} 资源授权失效,{op1} 个资源没有拥有者。{op2}, 请填写交接人,完成交接后才能成功退出。",
"流水线权限代持人": "流水线权限代持人",
"移交以上用户组,将导致X流水线权限代持失效。请确认是否同步移交授权。": "移交以上用户组,将导致 {0} 流水线权限代持失效。请确认是否同步移交授权。",
"退出以上用户组,将导致X流水线权限代持失效,X个资源没有拥有者。查看详情, 请填写交接人,完成交接后才能成功退出。": "退出以上用户组,将导致 {op} 流水线权限代持失效,{op1} 个资源没有拥有者。{op2}, 请填写交接人,完成交接后才能成功退出。",
"确定续期": "确定续期",
"确定移交": "确定移交",
"确定退出": "确定退出",
Expand Down

0 comments on commit 04d0f18

Please sign in to comment.