File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed
Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ # Generated by Django 5.1.13 on 2025-12-06 21:52
2+
3+ from django .db import migrations , models
4+
5+
6+ class Migration (migrations .Migration ):
7+
8+ dependencies = [
9+ ("users" , "0015_user_metadata" ),
10+ ]
11+
12+ operations = [
13+ migrations .AddField (
14+ model_name = "user" ,
15+ name = "api_access_tier" ,
16+ field = models .CharField (
17+ choices = [
18+ ("restricted" , "Restricted" ),
19+ ("unrestricted" , "Unrestricted" ),
20+ ],
21+ default = "restricted" ,
22+ max_length = 32 ,
23+ help_text = "Indicates the API access tier for the user." ,
24+ ),
25+ ),
26+ ]
Original file line number Diff line number Diff line change @@ -101,6 +101,17 @@ class InterfaceType(models.TextChoices):
101101 choices = settings .LANGUAGES ,
102102 )
103103
104+ class ApiAccessTier (models .TextChoices ):
105+ RESTRICTED = "restricted" , "Restricted"
106+ UNRESTRICTED = "unrestricted" , "Unrestricted"
107+
108+ api_access_tier = models .CharField (
109+ max_length = 32 ,
110+ choices = ApiAccessTier .choices ,
111+ default = ApiAccessTier .RESTRICTED ,
112+ help_text = "Indicates the API access tier for the user." ,
113+ )
114+
104115 # Metadata - to update the intended use of this field, update description in Admin
105116 metadata = models .JSONField (
106117 null = True ,
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ class Meta:
100100 "app_theme" ,
101101 "interface_type" ,
102102 "language" ,
103+ "api_access_tier" ,
103104 )
104105
105106 def get_registered_campaigns (self , user : User ):
You can’t perform that action at this time.
0 commit comments