2025-12-23 21:23:54 +08:00

14 lines
451 B
Python

from jingrow.model.document import Document
def action_key(document: Document) -> str:
if document.doctype == "Site" and document.is_new():
return "allow_site_creation"
if document.doctype == "Server" and document.is_new():
return "allow_server_creation"
if document.doctype == "Release Group" and document.is_new():
return "allow_bench_creation"
if document.doctype == "Jcloude Webhook":
return "allow_webhook_configuration"
return ""