Skip to content

Commit 3311a29

Browse files
committed
pr fixes
1 parent a9bc59b commit 3311a29

File tree

8 files changed

+14
-55
lines changed

8 files changed

+14
-55
lines changed

addon_service/addon_operation_invocation/views.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from addon_service.common.permissions import (
88
IsAuthenticated,
9-
SessionUserIsOwner,
109
SessionUserMayAccessInvocation,
1110
SessionUserMayPerformInvocation,
1211
)
@@ -52,9 +51,6 @@ def get_permissions(self):
5251
match self.action:
5352
case "retrieve" | "retrieve_related":
5453
return [IsAuthenticated(), SessionUserMayAccessInvocation()]
55-
case "partial_update" | "update" | "destroy":
56-
# prohibit this? Maybe allow only to delete invocation from action log, but definitely not update
57-
return [IsAuthenticated(), SessionUserIsOwner()]
5854
case "create":
5955
return [SessionUserMayPerformInvocation()]
6056
case None:

addon_service/authorized_account/citation/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
@extend_schema_view(
1313
create=extend_schema(
14-
description='Create new authorized citation account for given external citation service.\n For OAuth services it\'s required to create account with `"initiate_oauth"=true` in order to proceed with OAuth flow'
14+
description="Create new authorized citation account for given external citation service. "
15+
'For OAuth services it\'s required to create account with `"initiate_oauth"=true` '
16+
"in order to proceed with OAuth flow"
1517
),
1618
)
1719
class AuthorizedCitationAccountViewSet(AuthorizedAccountViewSet):

addon_service/authorized_account/computing/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
@extend_schema_view(
1313
create=extend_schema(
14-
description='Create new authorized computing account for given external computing service.\n For OAuth services it\'s required to create account with `"initiate_oauth"=true` in order to proceed with OAuth flow'
14+
description="Create new authorized computing account for given external computing service.\n "
15+
'For OAuth services it\'s required to create account with `"initiate_oauth"=true` '
16+
"in order to proceed with OAuth flow"
1517
),
1618
)
1719
class AuthorizedComputingAccountViewSet(AuthorizedAccountViewSet):

addon_service/authorized_account/link/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
@extend_schema_view(
1313
create=extend_schema(
14-
description='Create new authorized link account for given external link service.\n For OAuth services it\'s required to create account with `"initiate_oauth"=true` in order to proceed with OAuth flow'
14+
description="Create new authorized link account for given external link service.\n "
15+
'For OAuth services it\'s required to create account with `"initiate_oauth"=true` '
16+
"in order to proceed with OAuth flow"
1517
),
1618
)
1719
class AuthorizedLinkAccountViewSet(AuthorizedAccountViewSet):

addon_service/authorized_account/storage/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515

1616
@extend_schema_view(
1717
create=extend_schema(
18-
description='Create new authorized storage account for given external storage service.\n For OAuth services it\'s required to create account with `"initiate_oauth"=true` in order to proceed with OAuth flow'
18+
description="Create new authorized storage account for given external storage service."
19+
'\n For OAuth services it\'s required to create account with `"initiate_oauth"=true` '
20+
"in order to proceed with OAuth flow"
1921
),
2022
)
2123
class AuthorizedStorageAccountViewSet(AuthorizedAccountViewSet):

addon_service/common/schemas.py

Lines changed: 0 additions & 47 deletions
This file was deleted.

addon_service/oauth1/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from addon_service.osf_models.fields import decrypt_string
1212

1313

14+
# Exclude oAuth views from openapi schema as they are from internal use only
1415
@extend_schema(exclude=True)
1516
def oauth1_callback_view(request):
1617
oauth_token = request.GET["oauth_token"]

addon_service/oauth2/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from addon_service.oauth2.utils import get_initial_access_token
1414

1515

16+
# Exclude oAuth views from openapi schema as they are from internal use only
1617
@extend_schema(exclude=True)
1718
@transaction.non_atomic_requests # async views and ATOMIC_REQUESTS do not mix
1819
async def oauth2_callback_view(request):

0 commit comments

Comments
 (0)