yx lin
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
20 additions and
6 deletions
-
apps/vue/src/api/webhooks/send-attempts.ts
-
apps/vue/src/api/webhooks/subscriptions.ts
-
apps/vue/src/components/Permission/src/PermissionModal.vue
-
apps/vue/src/components/Permission/src/types/permission.ts
-
apps/vue/src/views/identity/user/components/UserTable.vue
-
apps/vue/src/views/identity/user/hooks/usePermission.ts
|
|
|
@ -32,7 +32,9 @@ export const getList = (input: WebhookSendAttemptGetListInput) => { |
|
|
|
service: remoteServiceName, |
|
|
|
controller: controllerName, |
|
|
|
action: 'GetListAsync', |
|
|
|
params: input, |
|
|
|
params: { |
|
|
|
input: input, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
@ -59,7 +59,9 @@ export const getList = (input: WebhookSubscriptionGetListInput) => { |
|
|
|
service: remoteServiceName, |
|
|
|
controller: controllerName, |
|
|
|
action: 'GetListAsync', |
|
|
|
params: input, |
|
|
|
params: { |
|
|
|
input: input, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
<BasicModal |
|
|
|
v-bind="$attrs" |
|
|
|
@register="registerModal" |
|
|
|
:title="title" |
|
|
|
:title="getIdentity" |
|
|
|
:width="800" |
|
|
|
:min-height="600" |
|
|
|
@ok="handleSubmit" |
|
|
|
@ -57,7 +57,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script lang="ts"> |
|
|
|
import { defineComponent, ref } from 'vue'; |
|
|
|
import { computed, defineComponent, ref } from 'vue'; |
|
|
|
import { message } from 'ant-design-vue'; |
|
|
|
import { Card, Checkbox, Col, Divider, Row, Tabs } from 'ant-design-vue'; |
|
|
|
import { useLocalization } from '/@/hooks/abp/useLocalization'; |
|
|
|
@ -70,6 +70,7 @@ |
|
|
|
providerName: 'G', |
|
|
|
providerKey: '', |
|
|
|
readonly: false, |
|
|
|
identity: '', |
|
|
|
}; |
|
|
|
|
|
|
|
export default defineComponent({ |
|
|
|
@ -107,6 +108,12 @@ |
|
|
|
const [registerModal, { closeModal, changeOkLoading }] = useModalInner((val) => { |
|
|
|
model.value = val; |
|
|
|
}); |
|
|
|
const getIdentity = computed(() => { |
|
|
|
if (model.value.identity) { |
|
|
|
return `${L('Permissions')} - ${model.value.identity}`; |
|
|
|
} |
|
|
|
return title.value; |
|
|
|
}) |
|
|
|
|
|
|
|
function handleVisibleChange(visible: boolean) { |
|
|
|
if (!visible) { |
|
|
|
@ -130,6 +137,7 @@ |
|
|
|
L, |
|
|
|
activeKey, |
|
|
|
title, |
|
|
|
getIdentity, |
|
|
|
permissionTab, |
|
|
|
permissionTree, |
|
|
|
permissionGrantKeys, |
|
|
|
|
|
|
|
@ -2,6 +2,7 @@ export interface PermissionProps { |
|
|
|
providerName: string; |
|
|
|
providerKey?: string; |
|
|
|
readonly: boolean; |
|
|
|
identity?: string; |
|
|
|
} |
|
|
|
|
|
|
|
export interface PermissionTree { |
|
|
|
|
|
|
|
@ -58,7 +58,7 @@ |
|
|
|
{ |
|
|
|
auth: 'AbpIdentity.Users.ManagePermissions', |
|
|
|
label: L('Permissions'), |
|
|
|
onClick: showPermissionModal.bind(null, record.id), |
|
|
|
onClick: showPermissionModal.bind(null, record.id, record.userName), |
|
|
|
}, |
|
|
|
{ |
|
|
|
auth: 'AbpIdentity.Users.ManageClaims', |
|
|
|
|
|
|
|
@ -4,12 +4,13 @@ import { useUserStoreWithOut } from '/@/store/modules/user'; |
|
|
|
export function usePermission() { |
|
|
|
const [registerModel, { openModal }] = useModal(); |
|
|
|
|
|
|
|
function showPermissionModal(userId: string) { |
|
|
|
function showPermissionModal(userId: string, userName: string) { |
|
|
|
const userStore = useUserStoreWithOut(); |
|
|
|
const props = { |
|
|
|
providerName: 'U', |
|
|
|
providerKey: userId, |
|
|
|
readonly: userStore.getUserInfo.userId === userId, |
|
|
|
identity: userName, |
|
|
|
}; |
|
|
|
openModal(true, props, true); |
|
|
|
} |
|
|
|
|