This commit is contained in:
phaichayon
2026-06-16 17:01:29 +07:00
parent 90ee59d388
commit 0a484e0b45
28 changed files with 6483 additions and 277 deletions

View File

@@ -21,7 +21,9 @@ const PDF_PERMISSIONS = [
'crm.quotation.document.preview',
'crm.quotation.pdf.preview',
'crm.quotation.pdf.download',
'crm.quotation.pdf.generate_approved'
'crm.quotation.pdf.generate_approved',
'crm.document_artifact.read',
'crm.document_artifact.download'
];
function loadEnvFile(filePath) {
@@ -886,7 +888,7 @@ async function main() {
const users = {
admin: await ensureUser(sql, organization, creatorId, FIXTURE_USERS.admin, 'Task H.1 Admin', {
role: 'admin',
businessRole: 'it_admin',
businessRole: 'sales_manager',
permissions: [...PDF_PERMISSIONS, 'users:manage']
}),
pdfUser: await ensureUser(
@@ -897,13 +899,13 @@ async function main() {
'Task H.1 PDF User',
{
role: 'user',
businessRole: 'viewer',
businessRole: 'sales_support',
permissions: PDF_PERMISSIONS
}
),
viewer: await ensureUser(sql, organization, creatorId, FIXTURE_USERS.viewer, 'Task H.1 Viewer', {
role: 'user',
businessRole: 'viewer',
businessRole: 'sales_support',
permissions: ['crm.quotation.read']
})
};