feat: Add event co-managers permissions and allow managers/admins to signup guests on skill-restricted shifts
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -5,7 +5,7 @@ from .views import (
|
||||
RegistrationDomainRuleViewSet, RegistrationRestrictionSettingView,
|
||||
PendingUsersView, ApproveUserView, AdminUserViewSet,
|
||||
GenerateClaimLinkView, ClaimInfoView,
|
||||
SMTPSettingView, TestSMTPEmailView
|
||||
SMTPSettingView, TestSMTPEmailView, UserListView
|
||||
)
|
||||
|
||||
router = DefaultRouter()
|
||||
@@ -17,6 +17,7 @@ urlpatterns = [
|
||||
path('verify-email/', VerifyEmailView.as_view(), name='verify-email'),
|
||||
path('login/', LoginView.as_view(), name='login'),
|
||||
path('me/', MeView.as_view(), name='me'),
|
||||
path('all/', UserListView.as_view(), name='all-users'),
|
||||
path('restriction-setting/', RegistrationRestrictionSettingView.as_view(), name='restriction-setting'),
|
||||
path('smtp-setting/', SMTPSettingView.as_view(), name='smtp-setting'),
|
||||
path('smtp-setting/test/', TestSMTPEmailView.as_view(), name='smtp-setting-test'),
|
||||
|
||||
@@ -388,3 +388,10 @@ class ApproveUserView(views.APIView):
|
||||
name = user.get_display_name()
|
||||
user.delete()
|
||||
return Response({'message': f'Registrierung von {name} wurde abgelehnt und gelöscht.'})
|
||||
|
||||
class UserListView(views.APIView):
|
||||
permission_classes = [permissions.IsAuthenticated]
|
||||
|
||||
def get(self, request):
|
||||
users = User.objects.filter(is_active=True).order_by('username')
|
||||
return Response(UserSerializer(users, many=True).data)
|
||||
|
||||
Reference in New Issue
Block a user