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

14 lines
455 B
Python

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