Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

23.12 #273

Merged
merged 3 commits into from
Feb 14, 2024
Merged

23.12 #273

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion api/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
from api.model.prefix import Prefix, prefix_table
from api.model.groups import GroupInfo

admin.site.register(BCO, GuardedModelAdmin)
class BcoModelAdmin(admin.ModelAdmin):
search_fields = ["contents", "object_id"]
admin.site.register(BCO, BcoModelAdmin)
# admin.site.register(
admin.site.register(prefix_table)
admin.site.register(new_users)
admin.site.register(GroupInfo)
Expand Down
4 changes: 2 additions & 2 deletions search/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from drf_yasg import openapi
from drf_yasg.utils import swagger_auto_schema
from rest_framework import status
from rest_framework.permissions import IsAuthenticated
from rest_framework.permissions import AllowAny
from rest_framework.response import Response
from rest_framework.views import APIView
from search.selectors import search_db, controled_list
Expand All @@ -28,7 +28,7 @@ class SearchObjectsAPI(APIView):
```
"""

permission_classes = [IsAuthenticated]
permission_classes = [AllowAny]
auth = openapi.Parameter('test', openapi.IN_QUERY, description="test manual param", type=openapi.TYPE_BOOLEAN)

@swagger_auto_schema(
Expand Down
64 changes: 64 additions & 0 deletions tests/fixtures/test_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,70 @@
"codename": "view_authentication"
}
},
{
"model": "authtoken.token",
"pk": "07801a1a4cdbf1945e22ac8439f1db27fe813f7a",
"fields": {
"user": 6,
"created": "2022-05-10T20:35:53.548Z"
}
},
{
"model": "authtoken.token",
"pk": "0bd55c955fcbfc269f6dc8f61ea107674cafdecb",
"fields": {
"user": 8,
"created": "2022-05-10T20:53:42.503Z"
}
},
{
"model": "authtoken.token",
"pk": "166c6a8f7e6e34827f4231a37c73f4ff985b43a2",
"fields": {
"user": 5,
"created": "2022-05-10T20:35:14.846Z"
}
},
{
"model": "authtoken.token",
"pk": "2f2a599026581c158a07f968c56292c77f4be875",
"fields": {
"user": 2,
"created": "2022-05-10T20:35:14.509Z"
}
},
{
"model": "authtoken.token",
"pk": "3f5504d88a5085d0452b19350fb6f82ae7097dd0",
"fields": {
"user": 9,
"created": "2022-05-10T20:54:44.797Z"
}
},
{
"model": "authtoken.token",
"pk": "627626823549f787c3ec763ff687169206626149",
"fields": {
"user": 3,
"created": "2022-05-10T20:35:14.520Z"
}
},
{
"model": "authtoken.token",
"pk": "8d66642cb77c4cb55af75d0f6c4f2835f805dcaa",
"fields": {
"user": 4,
"created": "2022-05-10T20:35:14.695Z"
}
},
{
"model": "authtoken.token",
"pk": "c400a6076a2dfe7e9906ab86c6ad4574d1d60e03",
"fields": {
"user": 7,
"created": "2022-05-10T20:50:39.096Z"
}
},
{
"model": "auth.group",
"pk": 1,
Expand Down