Files
leerdoelen_tracker/backend/migrations/versions/0003_school_google_sso.py
Sam b470cd017e
All checks were successful
Build & Push / Build & Push image (push) Successful in 39s
feat: add Google Workspace SSO configuration per school
- Implemented Google SSO management in the school settings, allowing schools to configure their own OAuth2 credentials.
- Added fields for Client ID and Client Secret in the edit school modal and school detail page.
- Introduced functionality to save and clear Google SSO settings via API.
- Updated UI to display current SSO status and instructions for setting up Google OAuth2.
- Created a new database migration to add `google_client_id` and `google_client_secret` columns to the schools table.
2026-03-03 22:40:14 +01:00

30 lines
810 B
Python

"""schools: voeg Google Workspace SSO credentials toe per school
Revision ID: 0003
Revises: 0002
Create Date: 2026-03-03
Elke school heeft zijn eigen Google Workspace omgeving en dus
zijn eigen OAuth2 client_id en client_secret. Deze worden per school
opgeslagen en nooit blootgesteld via de API (enkel of ze ingesteld zijn).
"""
from alembic import op
import sqlalchemy as sa
revision = '0003'
down_revision = '0002'
branch_labels = None
depends_on = None
def upgrade():
op.add_column('schools',
sa.Column('google_client_id', sa.String(255), nullable=True))
op.add_column('schools',
sa.Column('google_client_secret', sa.String(255), nullable=True))
def downgrade():
op.drop_column('schools', 'google_client_secret')
op.drop_column('schools', 'google_client_id')