Skip to content

Commit 5681c0b

Browse files
之瑛蚂蚁代码服务
authored andcommitted
PullRequest: 877 fix: 补充启用按钮受编辑权限控制
Merge branch 'fix/update of [email protected]:oceanbase/oceanbase-developer-center.git into dev-4.3.4 https://code.alipay.com/oceanbase/oceanbase-developer-center/pull_requests/877 Reviewed-by: 晓康 <[email protected]> * fix: 补充启用按钮受编辑权限控制
1 parent 93f5c9a commit 5681c0b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/page/Auth/User/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,12 @@ class UserPage extends React.PureComponent<IProps, IState> {
181181
],
182182

183183
render: (enabled, record) => {
184-
const disabledOp = this.isMe(record);
184+
const canAcessUpdate = () =>
185+
canAcess({
186+
resourceIdentifier: IManagerResourceType.user,
187+
action: actionTypes.update,
188+
}).accessible;
189+
const disabledOp = this.isMe(record) || !canAcessUpdate();
185190
return (
186191
<StatusSwitch
187192
disabled={disabledOp}

0 commit comments

Comments
 (0)