Commit graph

27 commits

Author SHA1 Message Date
Matt Grutza
3ec62a3d52
Merge branch 'dev' into Feature/954-1004-user-account-management 2026-02-24 14:49:31 -06:00
None
54f3ee2185 Remove is_Active reference to user accounts
Removed is_active references and checks for users accounts as the functionality does not align with project direction
2026-02-23 18:39:54 -06:00
None
f453380f5c Remove user account disable/enable UI (keep backend guards)
Removed the frontend UI exposure
while keeping backend guards as defensive measures.

Removed:
- frontend/src/components/forms/User.jsx — Account Enabled switch
- frontend/src/components/tables/UsersTable.jsx — Status column
- apps/accounts/api_views.py — is_active check in TokenRefreshView
- apps/accounts/tests.py — related tests
2026-02-22 20:02:08 -06:00
None
db318e4981 Fix #954: Superuser detection; Feature #1004: User account disable/enable
Bug #954: The initialize_superuser endpoint only checked is_superuser=True, missing admin accounts created via the API (user_level=10). This caused users to intermittently see the "Create Super User" page instead of login.

Feature #1004: Admins can now disable/enable user accounts. Disabled users are blocked from JWT login, token refresh, XC API access, and all
authenticated endpoints. The last active admin cannot be disabled.

Files changed:

Backend:
- apps/accounts/api_views.py — Superuser check uses user_level>=10; token refresh blocks disabled users
- apps/accounts/models.py — CustomUserManager ensures create_superuser() always sets user_level=10
- apps/accounts/serializers.py — Last-admin protection guard; respect is_active on user creation
- apps/accounts/tests.py — new tests covering superuser detection, token
 refresh blocking, last-admin protection, disabled user login/access
- apps/backups/api_views.py — Switched from DRF's IsAdminUser (checks is_staff) to app's IsAdmin (checks user_level) on all 8 endpoints
- apps/backups/tests.py — new tests verifying user_level-based admin permission on backup endpoints
- apps/output/views.py — is_active check on xc_get_user(), xc_movie_stream(), xc_series_stream()
- apps/proxy/ts_proxy/views.py — is_active check on stream_xc()
- core/api_views.py — Admin notification filter uses user_level>=10
- core/developer_notifications.py — Admin checks use user_level>=10

Frontend:
- frontend/src/App.jsx — Null-safe superuser existence check
- frontend/src/components/forms/User.jsx — Account Enabled switch with
  self-disable prevention and tooltip
- frontend/src/components/tables/UsersTable.jsx — Status column (Active/Disabled badge)
2026-02-22 18:05:02 -06:00
dekzter
aece3367ce backend work for api key authentication 2026-02-21 13:45:07 -05:00
dekzter
24f812dc4d initial connect feature 2026-02-08 09:29:22 -05:00
SergeantPanda
5364123745 - Swagger/OpenAPI Migration: Migrated from drf-yasg (OpenAPI 2.0) to drf-spectacular (OpenAPI 3.0) for API documentation. This provides:
- Native Bearer token authentication support in Swagger UI - users can now enter just the JWT token and the "Bearer " prefix is automatically added
  - Modern OpenAPI 3.0 specification compliance
  - Better auto-generation of request/response schemas
  - Improved documentation accuracy with serializer introspection
2026-01-27 13:33:33 -06:00
SergeantPanda
cb1953baf2 Enhancement: Implement comprehensive logging for user authentication events and network access restrictions 2025-11-21 10:50:48 -06:00
SergeantPanda
dfaae6e617 Enhance UserViewSet queryset to prefetch related channel_profiles for improved performance 2025-09-14 19:47:40 -05:00
SergeantPanda
8cae13f845 Remove unneeded migration. 2025-09-02 09:59:06 -05:00
SergeantPanda
6f6c28ca7c Convert custom_properties to jsonb in the backend. 2025-09-02 09:41:51 -05:00
SergeantPanda
ac07a5217f Set last_login when successful login occurs. 2025-06-28 08:55:07 -05:00
SergeantPanda
1a8bbb6bb8 Reorder columns 2025-06-27 21:59:56 -05:00
SergeantPanda
1e91dd7597 Added all available fields. 2025-06-27 21:43:50 -05:00
dekzter
3f445607e0 looooots of updates for user-management, initial commit of access control 2025-05-31 18:01:46 -04:00
dekzter
e95c0859ab user custom properties, xc has its own password, properly checking xc permissions for streaming 2025-05-22 15:21:43 -04:00
dekzter
79104affe3 fixed migration issues 2025-05-18 11:53:09 -04:00
dekzter
74d58515d0 user management, user levels, user level channel access 2025-05-18 11:19:34 -04:00
dekzter
a9437e9214 new migrations 2025-03-05 17:18:04 -05:00
dekzter
3ecb49375c Websockets, fixed channel name collision, added back in multi-stream per channel support 2025-03-05 17:04:43 -05:00
Dispatcharr
814d6a6cda Added Super User Creator
Added creator
Corrected license in swagger
2025-03-03 14:57:38 -06:00
dekzter
3e3f4c85a1 multi stream support 2025-03-02 15:06:47 -05:00
kappa118
9c84b65302 initial migrations 2025-03-01 19:02:21 -05:00
kappa118
0dfa001f3a initial commit of react frontend 2025-02-23 14:35:19 -05:00
Dispatcharr
9da7adda92 Pre Alpha v4
Added login page
Added login/logout buttons
Added m3u settings
Added stream profiles to channels and streams
Added ability to add individual stream outside of m3u file
Added ability to add youtube live links as a stream source
Deleted migrations
Deleted pycache folders
Changed HDHR to get ip dynamically
2025-02-22 20:43:55 -06:00
Dispatcharr
7ae7dbe175 Pre Alpha Changes
Removed .DS_Store and added to gitignore

M3U add created
M3U delete fixed
Removed unused files
Django admin not so ugly now
2025-02-18 16:48:01 -06:00
Dispatcharr
8edb743ebd Initial commit 2025-02-18 11:14:09 -06:00