Initial commit - SoundWave v1.0
- Full PWA support with offline capabilities - Comprehensive search across songs, playlists, and channels - Offline playlist manager with download tracking - Pre-built frontend for zero-build deployment - Docker-based deployment with docker compose - Material-UI dark theme interface - YouTube audio download and management - Multi-user authentication support
This commit is contained in:
commit
51679d1943
254 changed files with 37281 additions and 0 deletions
23
backend/common/views.py
Normal file
23
backend/common/views.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
"""Common views"""
|
||||
|
||||
from rest_framework.permissions import IsAdminUser, IsAuthenticated
|
||||
from rest_framework.views import APIView
|
||||
|
||||
|
||||
class ApiBaseView(APIView):
|
||||
"""Base API view"""
|
||||
pass
|
||||
|
||||
|
||||
class AdminOnly(IsAdminUser):
|
||||
"""Admin only permission"""
|
||||
pass
|
||||
|
||||
|
||||
class AdminWriteOnly(IsAuthenticated):
|
||||
"""Allow all authenticated users to read and write their own data"""
|
||||
|
||||
def has_permission(self, request, view):
|
||||
# All authenticated users can perform any action
|
||||
# Data isolation is enforced at the view/queryset level via owner field
|
||||
return request.user and request.user.is_authenticated
|
||||
Loading…
Add table
Add a link
Reference in a new issue