addded paginated user space endpoint
This commit is contained in:
@ -414,6 +414,7 @@ class UserSpaceViewSet(viewsets.ModelViewSet):
|
||||
serializer_class = UserSpaceSerializer
|
||||
permission_classes = [(CustomIsSpaceOwner | CustomIsOwnerReadOnly) & CustomTokenHasReadWriteScope]
|
||||
http_method_names = ['get', 'patch', 'delete']
|
||||
pagination_class = DefaultPagination
|
||||
|
||||
def destroy(self, request, *args, **kwargs):
|
||||
if request.space.created_by == UserSpace.objects.get(pk=kwargs['pk']).user:
|
||||
|
@ -48,7 +48,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="us in user_spaces" :key="us.id">
|
||||
<td>{{ us.user.username }}</td>
|
||||
<td>{{ us.user.display_name }}</td>
|
||||
<td>
|
||||
<generic-multiselect
|
||||
class="input-group-text m-0 p-0"
|
||||
@ -238,8 +238,8 @@ export default {
|
||||
apiFactory.retrieveSpace(window.ACTIVE_SPACE_ID).then(r => {
|
||||
this.space = r.data
|
||||
})
|
||||
apiFactory.listUserSpaces().then(r => {
|
||||
this.user_spaces = r.data
|
||||
apiFactory.listUserSpaces(1, 25).then(r => { //TODO build proper pagination
|
||||
this.user_spaces = r.data.results
|
||||
})
|
||||
this.loadInviteLinks()
|
||||
},
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user