xo::db::chat_transcript instproc save_new (public)

 <instance of xo::db::chat_transcript[i]> save_new args [ args... ]

Defined in /var/www/openacs.org/packages/chat/tcl/xotcl-chat-procs.tcl

Save a new transcript, making sure its creator is granted the necessary operative privileges.

Parameters:
args (required)
Returns:
new transcript id

Testcases:
No testcase defined.
Source code:
if {![info exists :context_id]} {
    set :context_id ${:package_id}
}
::xo::dc transaction {
    set transcript_id [next]
    foreach privilege {edit view delete} {
        permission::grant  -party_id  ${:creation_user}  -object_id ${:transcript_id}  -privilege chat_transcript_${privilege}
    }
}
return $transcript_id
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: