Home
The Toolkit for Online Communities
17113 Community Members, 0 members online, 1697 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : Checklist for moving an OpenACS site from one host to another : One Message

Forum OpenACS Q&A: Re: Checklist for moving an OpenACS site from one host to another

There is another thread, started today, where this same service migration question is asked. That thread cross-referenced this older and more complete discussion.

As I came back here to review this thread, I saw that Tom had mentioned the possibility of placing an oacs instance in read-only mode (no db writes). I like the idea of this especially when doing a maintenance db dump on a running production system. Has anyone developed the procedure to place an instance in read-only mode? If so, would you share?

Or, maybe this really isn't practical or possible?

read-only mode might be achieved adding at the begining of db_dml & db_exec_psql a check against a parameter that you create that allow you to perform the given proc or not, though this is might not be the best solution, has worked for us at Galileo to allow users see classes that are expired but disallowing any change on them.
Here are the lines that does that for us:

#    if { [ad_conn user_id] && ![empty_string_p [dotlrn_community::get_community_id]] } {
#      if { ![dotlrn::admin_p] } {
#          if { [permission::permission_p -party_id [ad_conn user_id] -object_id [ad_conn package_id] -privilege admin] } {
#              set segment_id [dotlrn_community::get_rel_segment_id -community_id [dotlrn_community::get_community_id] -rel_type dotlrn_admin_rel]
#          } else {
#              set segment_id [dotlrn_community::get_rel_segment_id -community_id [dotlrn_community::get_community_id] -rel_type dotlrn_member_rel]
#          }
#          if { [permission::permission_p -party_id $segment_id -object_id [ad_conn package_id] -privilege ges_view] } {
#                ad_return_forbidden  "Permiso denegado"  "<blockquote>
#                  Esta clase ha expirado, la informaci&oacute;n no puede ser modificada.
#                </blockquote>"
#          }
#      }
#    }