Add permissions
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
:share-api="shareApi"
|
||||
:remove-shared-api="removeSharedApi"
|
||||
:get-shared-api="getSharedApi"
|
||||
:is-action-disable="(row) => row.id === authStore.userId"
|
||||
:model-value="modelValue"
|
||||
hide-self
|
||||
@update:modelValue="updateModelValue"
|
||||
@close="close"
|
||||
/>
|
||||
@@ -19,6 +19,10 @@ import ShareDomainDialog from 'components/ShareDomain/ShareDomainDialog.vue';
|
||||
import { IUserDisplay } from '../../types/UserTypes';
|
||||
import { IDomainOwnerDisplay } from '../../types/DomainTypes';
|
||||
import { api } from 'boot/axios';
|
||||
import { useAuthStore } from 'src/stores/useAuthStore';
|
||||
import { IResponse } from 'src/types/BaseTypes';
|
||||
|
||||
const authStore = useAuthStore();
|
||||
|
||||
interface Props {
|
||||
modelValue: boolean;
|
||||
@@ -35,11 +39,11 @@ async function shareApi(user: IUserDisplay, domain: IDomainOwnerDisplay) {
|
||||
}
|
||||
|
||||
async function removeSharedApi(user: IUserDisplay, domain: IDomainOwnerDisplay) {
|
||||
return api.delete(`api/managedomain/${domain.id}/${user.id}`);
|
||||
return api.delete<IResponse>(`api/managedomain/${domain.id}/${user.id}`);
|
||||
}
|
||||
|
||||
async function getSharedApi(domain: IDomainOwnerDisplay) {
|
||||
return api.get(`/api/managedomainuser/${domain.id}`);
|
||||
return api.get<IResponse>(`/api/managedomainuser/${domain.id}`);
|
||||
}
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
||||
Reference in New Issue
Block a user