feat(core): Add permissions import, purge and triage to model TicketCommentBase

ref: #732 #726
This commit is contained in:
2025-04-26 07:09:33 +09:30
parent a923a21660
commit 9461cdaf9d
2 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,17 @@
# Generated by Django 5.1.8 on 2025-04-25 21:36
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0026_alter_ticketbase_ticket_type'),
]
operations = [
migrations.AlterModelOptions(
name='ticketcommentbase',
options={'ordering': ['id'], 'permissions': [('import_ticketcommentbase', 'Can import ticket comment.'), ('purge_ticketcommentbase', 'Can purge ticket comment.'), ('triage_ticketcommentbase', 'Can triage ticket comment.')], 'verbose_name': 'Ticket Comment', 'verbose_name_plural': 'Ticket Comments'},
),
]

View File

@ -30,10 +30,16 @@ class TicketCommentBase(
'id'
]
unique_together = ('external_system', 'external_ref',)
permissions = [
('import_ticketcommentbase', 'Can import ticket comment.'),
('purge_ticketcommentbase', 'Can purge ticket comment.'),
('triage_ticketcommentbase', 'Can triage ticket comment.'),
]
sub_model_type = 'comment'
unique_together = ('external_system', 'external_ref',)
verbose_name = "Ticket Comment"
verbose_name_plural = "Ticket Comments"