Index: openacs-4/contrib/packages/events/www/admin/activity-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/activity-add.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/events/www/admin/activity-add.tcl 27 Feb 2004 10:34:50 -0000 1.2 +++ openacs-4/contrib/packages/events/www/admin/activity-add.tcl 23 Nov 2004 19:59:03 -0000 1.3 @@ -24,7 +24,19 @@ } set context [list [list activities Activities] "New Activity"] +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +if { $package_admin != 1 && $permission_create != 1} { + + doc_return 200 text/html "[ad_header {Permission Denied}] +

Permission Denied

+ You don't have permission to admin Events Management. " + ad_script_abort +} + form create activity element create activity name \ Index: openacs-4/contrib/packages/events/www/admin/activity-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity-edit.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/events/www/admin/activity-edit.tcl 27 Feb 2004 10:34:50 -0000 1.3 +++ openacs-4/contrib/packages/events/www/admin/activity-edit.tcl 23 Nov 2004 19:59:04 -0000 1.4 @@ -24,6 +24,17 @@ } } +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] + +if { $package_admin != 1} { + + doc_return 200 text/html "

Permission Denied

+ You don't have permission to admin Events Management. " + ad_script_abort +} + form create activity element create activity activity_id \ Index: openacs-4/contrib/packages/events/www/admin/activity-orders.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity-orders.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/activity-orders.tcl 9 Mar 2003 12:08:22 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/activity-orders.tcl 23 Nov 2004 19:59:04 -0000 1.2 @@ -21,7 +21,19 @@ return 1 } } +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +if { $package_admin != 1 && $permission_create != 1} { + + doc_return 200 text/html "

Permission Denied

+ You don't have permission to admin Events Management. " + ad_script_abort +} + + # what reg state do we plug into the database? set date_format [parameter::get -parameter date_format -default "MM/DD/YYYY"] set time_format [parameter::get -parameter time_format -default "HH12:MIam"] Index: openacs-4/contrib/packages/events/www/admin/activity.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity.adp,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/events/www/admin/activity.adp 27 Feb 2004 10:33:43 -0000 1.4 +++ openacs-4/contrib/packages/events/www/admin/activity.adp 23 Nov 2004 19:59:04 -0000 1.5 @@ -48,9 +48,11 @@

+

+

Organizer Roles

You may create default organizer roles for this activity type. @@ -66,7 +68,9 @@
  • There are no organizer roles for this activity
  • +
  • Add an organizer role +

    Event Statistics

    @@ -86,7 +90,9 @@ Index: openacs-4/contrib/packages/events/www/admin/activity.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/events/www/admin/activity.tcl 27 Feb 2004 10:34:50 -0000 1.3 +++ openacs-4/contrib/packages/events/www/admin/activity.tcl 23 Nov 2004 19:59:04 -0000 1.4 @@ -23,7 +23,18 @@ set package_id [ad_conn package_id] +set user_id [ad_conn user_id] +#see if user have admin permission for the package +set permission_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +if { $permission_admin != 1 && $permission_create != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + events::activity::get -activity_id $activity_id -array activity_info events::activity::get_creator -activity_id $activity_id -array creator_info events::activity::get_stats -activity_id $activity_id -array activity_stats Index: openacs-4/contrib/packages/events/www/admin/event-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-add-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/events/www/admin/event-add-2.tcl 9 Mar 2003 16:27:55 -0000 1.2 +++ openacs-4/contrib/packages/events/www/admin/event-add-2.tcl 23 Nov 2004 19:59:04 -0000 1.3 @@ -14,7 +14,19 @@ {activity_id:integer,notnull} {venue_id:integer,notnull} } +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +if { $package_admin != 1 && $permission_create != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + form create event_add element create event_add venue_id \ @@ -183,6 +195,7 @@ -additional_note $additional_note \ ] + permission::grant -object_id $event_id -privilege "admin" -party_id $user_id if { $event_price > 0 } { set date_time "[lindex $start_time 1]/[lindex $start_time 2]/[lindex $start_time 0]" set end_date_time "[lindex $end_time 1]/[lindex $end_time 2]/[lindex $end_time 0]" Index: openacs-4/contrib/packages/events/www/admin/event-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-add.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/events/www/admin/event-add.tcl 9 Mar 2003 16:27:55 -0000 1.2 +++ openacs-4/contrib/packages/events/www/admin/event-add.tcl 23 Nov 2004 19:59:04 -0000 1.3 @@ -12,7 +12,20 @@ } { {activity_id:integer,notnull} } +set package_id [ad_conn package_id] +set user_id [ad_conn user_id] +#see if user have admin permission for the package +set permission_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +if { $permission_admin != 1 && $permission_create != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + set venues [events::venue::venues_get_options] if {[llength $venues] == 0} { Index: openacs-4/contrib/packages/events/www/admin/event-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-edit.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/events/www/admin/event-edit.tcl 9 Mar 2003 16:27:55 -0000 1.2 +++ openacs-4/contrib/packages/events/www/admin/event-edit.tcl 23 Nov 2004 19:59:04 -0000 1.3 @@ -25,8 +25,20 @@ } } + set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set event_admin [permission::permission_p -object_id $event_id -party_id $user_id -privilege "admin"] +if { $package_admin != 1 && $event_admin != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + events::event::get -event_id $event_id -array event_info events::event::get_stats -event_id $event_id -array stat_info @@ -39,9 +51,6 @@ set price $sale_price } # If admin - if { [permission::permission_p -no_cache -party_id $user_id -object_id $event_id -privilege "admin"] } { - set admin_text "
    (edit user class prices)
    " - } } form create event_edit Index: openacs-4/contrib/packages/events/www/admin/event-orders.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-orders.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/event-orders.tcl 9 Mar 2003 12:08:22 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/event-orders.tcl 23 Nov 2004 19:59:04 -0000 1.2 @@ -21,7 +21,18 @@ return 1 } } +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] + +if { $package_admin != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + # what reg state do we plug into the database? set date_format [parameter::get -parameter date_format -default "MM/DD/YYYY"] set time_format [parameter::get -parameter time_format -default "HH12:MIam"] Index: openacs-4/contrib/packages/events/www/admin/event-price-ae-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-price-ae-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/event-price-ae-2.tcl 9 Mar 2003 12:08:22 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/event-price-ae-2.tcl 23 Nov 2004 19:59:04 -0000 1.2 @@ -2,7 +2,18 @@ # Owner: bryanche@arsdigita.com # Purpose: Verify and insert price/ecommerce data ##### +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] + +if { $package_admin != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + ### we're not supporting prices yet. return Index: openacs-4/contrib/packages/events/www/admin/event-price-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-price-ae.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/event-price-ae.tcl 9 Mar 2003 12:08:22 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/event-price-ae.tcl 23 Nov 2004 19:59:04 -0000 1.2 @@ -2,7 +2,18 @@ # Owner: bryanche@arsdigita.com # Purpose: Allow admins to edit and update prices/ecommerce info ##### +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] + +if { $package_admin != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + ### we're not supporting prices at this time return Index: openacs-4/contrib/packages/events/www/admin/event-toggle-available-p.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-toggle-available-p.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/event-toggle-available-p.tcl 9 Mar 2003 12:08:22 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/event-toggle-available-p.tcl 23 Nov 2004 19:59:04 -0000 1.2 @@ -18,7 +18,18 @@ return 1 } } +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +set event_admin [permission::permission_p -object_id $event_id -party_id $user_id -privilege "admin"] +if { $package_admin != 1 && $permission_create != 1 && $event_admin != 1} { + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + db_transaction { events::event::toggle_available_p -event_id $event_id Index: openacs-4/contrib/packages/events/www/admin/event.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event.adp,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/events/www/admin/event.adp 27 Feb 2004 10:37:53 -0000 1.4 +++ openacs-4/contrib/packages/events/www/admin/event.adp 23 Nov 2004 19:59:04 -0000 1.5 @@ -1,12 +1,12 @@ @title;noquote@ @context;noquote@ - +
    Manage Permissions
    +
    - @@ -95,11 +98,15 @@ Availability Status Current +   (toggle) + Discontinued +   (toggle) +  
    You may want to @@ -111,30 +118,34 @@ - + +

    Organizers

    -

    Agenda Files

    @@ -152,3 +163,4 @@

    Event Notes

    +
    \ No newline at end of file Index: openacs-4/contrib/packages/events/www/admin/event.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/events/www/admin/event.tcl 4 Jun 2003 01:44:50 -0000 1.3 +++ openacs-4/contrib/packages/events/www/admin/event.tcl 23 Nov 2004 19:59:04 -0000 1.4 @@ -25,11 +25,25 @@ } } + events::event::get -event_id $event_id -array event_info events::event::get_stats -event_id $event_id -array event_stats - set count_spotsremaining [expr $event_stats(max_people) - $event_stats(approved)] +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +set event_admin [permission::permission_p -object_id $event_id -party_id $user_id -privilege "admin"] + +if { $package_admin != 1 && $permission_create != 1 && $event_admin != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + +set admin_permission [permission::permission_p -object_id $event_id -party_id $user_id -privilege "admin"] set pretty_location "" if { [empty_string_p $event_info(city)] } { append pretty_location "$event_info(name)" @@ -45,7 +59,7 @@ append pretty_location "$event_info(usps_abbrev)" } set title "$pretty_location: $event_info(timespan)" -set context [list [list "activities" Activities] [list "activity?activity_id=$event_info(activity_id)" $event_info(name)] $pretty_location] +set context [list [list "../event-info?event_id=$event_id" $event_info(name)] $pretty_location] set attachments_enabled_p [events::event::attachments_enabled_p] if {$attachments_enabled_p} { Index: openacs-4/contrib/packages/events/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/index.adp,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/events/www/admin/index.adp 22 May 2003 13:52:52 -0000 1.3 +++ openacs-4/contrib/packages/events/www/admin/index.adp 23 Nov 2004 19:59:04 -0000 1.4 @@ -1,42 +1,42 @@ - -Events Administration -@context_bar;noquote@ - - -

    -(Note: To add/edit an event, you must first go to the -activities page to select the type of -activity for your event. Then, you may add/edit an event -based upon that activity.) - - -

    Current Events Registration Status

    - - -
      -
    • There are no current events to display -
    -
    - - - - - - - - - - - -
    ActivityLocationDate
    - @available_events_and_locations.name@@available_events_and_locations.city@@available_events_and_locations.timespan@
    -
    - -

    + +Events +@context_bar;noquote@ + + +

    +(Note: To add/edit an event, you must first go to the +activities page to select the type of +activity for your event. Then, you may add/edit an event +based upon that activity.) + + +

    Current Events Registration Status

    + + +
      +
    • There are no current events to display +
    +
    + + + + + + + + + + + + +
    ActivityLocationDatePermissions
    + @available_events_and_locations.name@@available_events_and_locations.city@@available_events_and_locations.timespan@Permissions
    +
    + +

    + Index: openacs-4/contrib/packages/events/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/index.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/events/www/admin/index.tcl 9 Mar 2003 16:27:55 -0000 1.2 +++ openacs-4/contrib/packages/events/www/admin/index.tcl 23 Nov 2004 19:59:04 -0000 1.3 @@ -21,9 +21,18 @@ context_bar:onevalue } - -ad_require_permission [ad_conn package_id] admin +set user_id [ad_conn user_id] set package_id [ad_conn package_id] +#see if user have admin permission for the package +set permission_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +if { $permission_admin != 1 && $permission_create != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + set context_bar [ad_context_bar] set date_format [parameter::get -parameter date_format -default "MM/DD/YYYY"] Index: openacs-4/contrib/packages/events/www/admin/one-role.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/one-role.adp,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/events/www/admin/one-role.adp 22 May 2003 13:52:52 -0000 1.2 +++ openacs-4/contrib/packages/events/www/admin/one-role.adp 23 Nov 2004 19:59:04 -0000 1.3 @@ -45,8 +45,5 @@ - + Index: openacs-4/contrib/packages/events/www/admin/one-role.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/one-role.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/one-role.tcl 9 Mar 2003 12:08:22 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/one-role.tcl 23 Nov 2004 19:59:05 -0000 1.2 @@ -13,7 +13,6 @@ } set title "One Role" - set context_bar [ad_context_bar [list "roles" "Roles"] "One Role"] events::organizer::get_role -role_id $role_id -array role_info Index: openacs-4/contrib/packages/events/www/admin/order-same-person.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/order-same-person.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/order-same-person.tcl 9 Mar 2003 12:08:22 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/order-same-person.tcl 23 Nov 2004 19:59:05 -0000 1.2 @@ -14,9 +14,20 @@ } { {user_id:integer,notnull} } - set admin_id [ad_maybe_redirect_for_registration] +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] + +if { $package_admin != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + set output_html_page "whole_page" # this is for events_write_order_summary Index: openacs-4/contrib/packages/events/www/admin/order-search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/order-search.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/order-search.tcl 9 Mar 2003 12:08:22 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/order-search.tcl 23 Nov 2004 19:59:05 -0000 1.2 @@ -17,6 +17,19 @@ } set admin_id [ad_maybe_redirect_for_registration] +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] + + +if { $package_admin != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + set output_html_page "whole_page" # for events_write_order_summary Index: openacs-4/contrib/packages/events/www/admin/organizer-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/organizer-edit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/organizer-edit.tcl 9 Mar 2003 12:08:22 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/organizer-edit.tcl 23 Nov 2004 19:59:05 -0000 1.2 @@ -23,7 +23,20 @@ [list "activity?activity_id=$activity_id" "Activity"] \ [list "event?event_id=$event_id" "Event"] "Edit Organizer Role"] set title "Edit Organizer" +set package_id [ad_conn package_id] +set user_id [ad_conn user_id] +#see if user have admin permission for the package +set permission_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +if { $permission_admin != 1 && $permission_create != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + form create organizer_edit element create organizer_edit activity_id \ Index: openacs-4/contrib/packages/events/www/admin/role-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-add.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/role-add.tcl 9 Mar 2003 12:08:23 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/role-add.tcl 23 Nov 2004 19:59:05 -0000 1.2 @@ -14,7 +14,20 @@ {activity_id ""} {role_ids:multiple ""} } +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +set event_admin [permission::permission_p -object_id $event_id -party_id $user_id -privilege "admin"] +if { $package_admin != 1 && $permission_create != 1 && $event_admin != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + if {[exists_and_not_null event_id]} { set title "Add Organizer Roles" set role_create "role-create?activity_id=$activity_id&event_id=$event_id" Index: openacs-4/contrib/packages/events/www/admin/role-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-create.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/role-create.tcl 9 Mar 2003 12:08:23 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/role-create.tcl 23 Nov 2004 19:59:05 -0000 1.2 @@ -15,7 +15,20 @@ {activity_id:naturalnum,optional} {event_id:naturalnum,optional} } +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +set event_admin [permission::permission_p -object_id $event_id -party_id $user_id -privilege "admin"] +if { $package_admin != 1 && $permission_create != 1 && $event_admin != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + if {[exists_and_not_null event_id]} { set context_bar [ad_context_bar [list "activities" "Activities"] \ [list "activity?activity_id=$activity_id" "Activity"] \ Index: openacs-4/contrib/packages/events/www/admin/role-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-delete.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/role-delete.tcl 9 Mar 2003 12:08:23 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/role-delete.tcl 23 Nov 2004 19:59:05 -0000 1.2 @@ -11,7 +11,19 @@ } { {role_id:naturalnum,notnull} } +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] + +if { $package_admin != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + events::organizer::get_role -role_id $role_id -array role_info set title "Delete Role?" Index: openacs-4/contrib/packages/events/www/admin/roles.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/roles.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/roles.tcl 9 Mar 2003 12:08:23 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/roles.tcl 23 Nov 2004 19:59:05 -0000 1.2 @@ -13,7 +13,19 @@ } set context_bar [ad_context_bar Roles] +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +if { $package_admin != 1 && $permission_create != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + db_multirow roles select_roles {} ad_return_template Index: openacs-4/contrib/packages/events/www/admin/send-mail.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/send-mail.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/events/www/admin/send-mail.tcl 13 Mar 2003 10:05:27 -0000 1.2 +++ openacs-4/contrib/packages/events/www/admin/send-mail.tcl 23 Nov 2004 19:59:05 -0000 1.3 @@ -26,7 +26,19 @@ } set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set event_admin [permission::permission_p -object_id $event_id -party_id $user_id -privilege "admin"] +if { $package_admin != 1 && $event_admin !=1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + + if {[exists_and_not_null event_id]} { if {[exists_and_not_null activity_id]} { ad_return_warning "Both Variables Cannot Be Specified" "You must either specify Event_id or Activity_id, not both at the same time." Index: openacs-4/contrib/packages/events/www/admin/venue-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venue-delete.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/venue-delete.tcl 9 Mar 2003 12:08:23 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/venue-delete.tcl 23 Nov 2004 19:59:05 -0000 1.2 @@ -28,7 +28,19 @@ return 1 } } +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] + +if { $package_admin != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + events::venue::delete -venue_id $venue_id ad_returnredirect "venues" Index: openacs-4/contrib/packages/events/www/admin/venues-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venues-ae.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/events/www/admin/venues-ae.tcl 27 Feb 2004 10:35:12 -0000 1.2 +++ openacs-4/contrib/packages/events/www/admin/venues-ae.tcl 23 Nov 2004 19:59:05 -0000 1.3 @@ -17,7 +17,18 @@ context:onevalue in_use_p:onevalue } +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +if { $package_admin != 1 && $permission_create != 1} { + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + set tz_list [db_list_of_lists get_timezones "select tz, tz_id from timezones order by tz"] set tz_list [linsert $tz_list 0 ""] Index: openacs-4/contrib/packages/events/www/admin/venues-connecting.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venues-connecting.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/venues-connecting.tcl 9 Mar 2003 12:08:23 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/venues-connecting.tcl 23 Nov 2004 19:59:05 -0000 1.2 @@ -17,7 +17,19 @@ return 1 } } +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +if { $package_admin != 1 && $permission_create != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + set context_bar [ad_context_bar [list "venues" "Venues"] " Venue Connections"] form create venue Index: openacs-4/contrib/packages/events/www/admin/venues-hierarchy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venues-hierarchy.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/venues-hierarchy.tcl 9 Mar 2003 12:08:23 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/venues-hierarchy.tcl 23 Nov 2004 19:59:05 -0000 1.2 @@ -17,7 +17,19 @@ return 1 } } +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] + +if { $package_admin != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + set context_bar [ad_context_bar [list "venues" "Venues"] " Venue Hierarchy"] form create venue Index: openacs-4/contrib/packages/events/www/admin/venues.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venues.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/events/www/admin/venues.tcl 30 Mar 2004 14:54:51 -0000 1.2 +++ openacs-4/contrib/packages/events/www/admin/venues.tcl 23 Nov 2004 19:59:05 -0000 1.3 @@ -24,7 +24,18 @@ set context_bar [ad_context_bar "Venues"] set package_id [ad_conn package_id] +set user_id [ad_conn user_id] +set package_admin [permission::permission_p -object_id $package_id -party_id $user_id -privilege "admin"] +set permission_create [permission::permission_p -object_id $package_id -party_id $user_id -privilege "create"] +if { $package_admin != 1 && $permission_create != 1} { + + doc_return 200 text/html "

    Permission Denied

    + You don't have permission to admin Events Management. " + ad_script_abort +} + + #the columns for ad_table set col [list venue_name city state max_people connecting]