add import authorized oauth

Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
Ronni Skansing
2025-12-13 21:39:08 +01:00
parent 5418d37005
commit bbc49deedd
10 changed files with 861 additions and 72 deletions

View File

@@ -40,6 +40,10 @@ type OAuthProvider struct {
// status
IsAuthorized bool `gorm:"not null;default:false;"`
// indicates if this provider was created via import (with pre-authorized tokens)
// imported providers cannot be authorized/reauthorized via oauth flow
IsImported bool `gorm:"not null;default:false;"`
// can belong-to
CompanyID *uuid.UUID `gorm:"uniqueIndex:idx_oauth_providers_unique_name_and_company_id;"`
Company *Company `gorm:"foreignkey:CompanyID;"`