docs re-org
This commit is contained in:
@@ -99,8 +99,9 @@ class SiteSerializer(serializers.ModelSerializer):
|
||||
- If domain has no protocol, add https://
|
||||
- Validates that the final URL is valid
|
||||
"""
|
||||
if not value:
|
||||
return value
|
||||
# Allow empty/None values
|
||||
if not value or value.strip() == '':
|
||||
return None
|
||||
|
||||
value = value.strip()
|
||||
|
||||
|
||||
@@ -496,8 +496,9 @@ class SiteViewSet(AccountModelViewSet):
|
||||
from rest_framework.permissions import AllowAny
|
||||
return [AllowAny()]
|
||||
if self.action == 'create':
|
||||
# For create, only require authentication - not active account status
|
||||
return [permissions.IsAuthenticated()]
|
||||
return [IsEditorOrAbove()]
|
||||
return [IsAuthenticatedAndActive(), HasTenantAccess(), IsEditorOrAbove()]
|
||||
|
||||
def get_queryset(self):
|
||||
"""Return sites accessible to the current user."""
|
||||
|
||||
Reference in New Issue
Block a user