Skip to content

Commit 8708679

Browse files
committed
refactor: rename serializer for removing users from a role with a scope
1 parent e0b66ca commit 8708679

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

openedx_authz/rest_api/v1/serializers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class AddUsersToRoleWithScopeSerializer(RoleMixin, ScopeMixin): # pylint: disab
4444
users = serializers.ListField(child=serializers.CharField(max_length=255), allow_empty=False)
4545

4646

47-
class RemoveUserFromRoleWithScopeSerializer(RoleMixin, ScopeMixin): # pylint: disable=abstract-method
48-
"""Serializer for removing a user from a role with a scope."""
47+
class RemoveUsersFromRoleWithScopeSerializer(RoleMixin, ScopeMixin): # pylint: disable=abstract-method
48+
"""Serializer for removing users from a role with a scope."""
4949

5050
users = CommaSeparatedListField(allow_blank=False)
5151

openedx_authz/rest_api/v1/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
ListUsersInRoleWithScopeSerializer,
3333
PermissionValidationResponseSerializer,
3434
PermissionValidationSerializer,
35-
RemoveUserFromRoleWithScopeSerializer,
35+
RemoveUsersFromRoleWithScopeSerializer,
3636
UserRoleAssignmentSerializer,
3737
)
3838

@@ -268,7 +268,7 @@ def put(self, request: HttpRequest) -> Response:
268268
)
269269
def delete(self, request: HttpRequest) -> Response:
270270
"""Remove multiple users from a specific role within a scope."""
271-
serializer = RemoveUserFromRoleWithScopeSerializer(data=request.query_params)
271+
serializer = RemoveUsersFromRoleWithScopeSerializer(data=request.query_params)
272272
serializer.is_valid(raise_exception=True)
273273

274274
user_identifiers = serializer.validated_data["users"]

0 commit comments

Comments
 (0)