Index: openacs-4/packages/dotlrn/sql/oracle/dotlrn-users-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/Attic/dotlrn-users-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-users-create.sql 30 Oct 2001 21:26:58 -0000 1.1 @@ -0,0 +1,28 @@ + +-- +-- The DotLRN basic system +-- copyright 2001, OpenForce, Inc. +-- distributed under the GNU GPL v2 +-- +-- for Oracle 8/8i. (We're guessing 9i works, too). +-- +-- ben@openforce.net +-- October 30th, 2001 +-- we remember September 11th, 2001 +-- + +-- +-- Users of the dotLRN system +-- + +create table dotlrn_users ( + user_id integer not null + constraint dlrn_user_id_fk + references users(user_id) + constraint dlrn_user_id_pk + primary key, + role varchar(100) not null, + page_id integer + constraint dlrn_user_page_id_fk + references portals(portal_id) +); Index: openacs-4/packages/dotlrn/sql/oracle/dotlrn-users-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/Attic/dotlrn-users-package-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-users-package-create.sql 30 Oct 2001 21:26:58 -0000 1.1 @@ -0,0 +1,54 @@ + +-- +-- The DotLRN basic system +-- copyright 2001, OpenForce, Inc. +-- distributed under the GNU GPL v2 +-- +-- for Oracle 8/8i. (We're guessing 9i works, too). +-- +-- ben@openforce.net +-- October 30th, 2001 +-- we remember September 11th, 2001 +-- + +-- +-- Users of the dotLRN system +-- + +create or replace package dotlrn_user +is + function new ( + user_id in dotlrn_users.user_id%TYPE, + role in dotlrn_users.role%TYPE + ) return dotlrn_users.user_id%TYPE; + + procedure delete ( + user_id in dotlrn_users.user_id%TYPE + ); +end; +/ +show errors + + +create or replace package body dotlrn_user +is + function new ( + user_id in dotlrn_users.user_id%TYPE, + role in dotlrn_users.role%TYPE + ) return dotlrn_users.user_id%TYPE + is + begin + insert into dotlrn_users (user_id, role) values (user_id, role); + end; + + procedure delete ( + user_id in dotlrn_users.user_id%TYPE + ) + is + begin + delete from dotlrn_users where user_id= user_id; + end; + +end; +/ +show errors Index: openacs-4/packages/dotlrn/tcl/community-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 12 Oct 2001 18:16:20 -0000 1.10 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 30 Oct 2001 21:26:58 -0000 1.11 @@ -5,6 +5,7 @@ # Distributed under the GNU GPL v2 # # September 28th, 2001 +# ben@openforce.net # ad_library { Index: openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl 30 Oct 2001 21:26:58 -0000 1.1 @@ -0,0 +1,148 @@ + +# +# Procs for dotLRN Security +# Copyright 2001 OpenForce, inc. +# Distributed under the GNU GPL v2 +# +# October 30th, 2001 +# ben@openforce.net +# + +ad_library { + + Procs to manage DOTLRN Security + + @author ben@openforce.net + @creation-date 2001-10-30 + +} + +namespace eval dotlrn { + + ad_proc -public user_add { + user_id + } { + Add a user as a dotLRN user + } { + db_dml add_user {} + } + + ad_proc -public user_remove { + user_id + } { + Remove a user from the set of dotLRN users + } { + db_dml remove_user {} + } + + ad_proc -public guest_add { + community_id + user_id + } { + Add a guest to a particular community + } { + db_dml add_guest {} + } + + ad_proc -public guest_remove { + community_id + user_id + } { + Remove a guest from a particular community + } { + db_dml remove_guest {} + } + + ad_proc -public user_can_browse_p { + {user_id ""} + } { + Check is a user can browse dotLRN + } { + } + + ad_proc -public require_user_browse { + {user_id ""} + } { + Require that a user be able to browse dotLRN + } { + } + + ad_proc -public user_can_read_sensitive_data_p { + {user_id ""} + } { + Check if a user can read sensitive data in dotLRN + } { + } + + ad_proc -public require_user_read_sensitive_data { + {user_id ""} + } { + Require that a user be able to read sensitive data + } { + } + + ad_proc -public user_can_read_community_type_p { + {-user_id ""} + community_type + } { + Check if a user can read a community type + } { + } + + ad_proc -public require_user_read_community_type { + {-user_id ""} + community_type + } { + require that a user be able to read a community type + } { + } + + ad_proc -public user_can_read_community_p { + {-user_id ""} + community_id + } { + Check if a user can read a community + } { + } + + ad_proc -public require_user_read_community { + {-user_id ""} + community_id + } { + require that a user be able to read a community + } { + } + + ad_proc -public user_is_community_member_p { + {-user_id ""} + community_id + } { + check if a user is a member of a community + } { + } + + ad_proc -public require_user_community_member { + {-user_id ""} + community_id + } { + require that a user be member of a particular community + } { + } + + ad_proc -public user_can_admin_community_p { + {-user_id ""} + community_id + } { + check if a user can admin a community + } { + } + + ad_proc -public require_user_admin_community { + {-user_id ""} + community_id + } { + require that user be able to admin a community + } { + } + +}