Browse Source

[Fix][UI Next][V1.0.0-Alpha] Fix udf function auth bug (#9111)

3.0.0/version-upgrade
Devosend 3 years ago committed by GitHub
parent
commit
184691ab17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      dolphinscheduler-ui-next/src/views/security/user-manage/components/use-authorize.ts

8
dolphinscheduler-ui-next/src/views/security/user-manage/components/use-authorize.ts

@ -102,11 +102,11 @@ export function useAuthorize() {
]) ])
state.loading = false state.loading = false
state.authorizedUdfs = udfs[0].map( state.authorizedUdfs = udfs[0].map(
(item: { name: string; id: number }) => item.id (item: { funcName: string; id: number }) => item.id
) )
state.unauthorizedUdfs = [...udfs[0], ...udfs[1]].map( state.unauthorizedUdfs = [...udfs[0], ...udfs[1]].map(
(item: { name: string; id: number }) => ({ (item: { funcName: string; id: number }) => ({
label: item.name, label: item.funcName,
value: item.id value: item.id
}) })
) )
@ -202,7 +202,7 @@ export function useAuthorize() {
if (type === 'authorize_udf') { if (type === 'authorize_udf') {
await grantUDFFunc({ await grantUDFFunc({
userId, userId,
udfIds: state.authorizedUdfResources.join(',') udfIds: state.authorizedUdfs.join(',')
}) })
} }
if (type === 'authorize_resource') { if (type === 'authorize_resource') {

Loading…
Cancel
Save