latest changes incl grocery list
This commit is contained in:
@@ -489,3 +489,16 @@ class FieldNoteAssociation(models.Model):
|
||||
if not self._state.adding:
|
||||
raise ValidationError("Association history is append-only.")
|
||||
return super().save(*args, **kwargs)
|
||||
|
||||
|
||||
class McpAccessToken(models.Model):
|
||||
"""Revocable credential for read-only MCP access; never stores the raw token."""
|
||||
|
||||
user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name="boomcast_mcp_tokens")
|
||||
name = models.CharField(max_length=100)
|
||||
token_hash = models.CharField(max_length=64, unique=True)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
revoked_at = models.DateTimeField(null=True, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.user}: {self.name}"
|
||||
|
||||
Reference in New Issue
Block a user