From: Chris W. <la...@us...> - 2005-03-06 15:03:11
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23024/lib/OpenInteract2 Modified Files: CreateSecurity.pm Log Message: fix typo Index: CreateSecurity.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/CreateSecurity.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CreateSecurity.pm 4 Mar 2005 02:54:18 -0000 1.1 --- CreateSecurity.pm 6 Mar 2005 15:02:59 -0000 1.2 *************** *** 11,17 **** my @FIELDS = qw( ! scope scope_id level action spops where ! iterator website_dir num_processed num_failed ! start_time end_time elapsed_time ); __PACKAGE__->mk_accessors( @FIELDS ); --- 11,17 ---- my @FIELDS = qw( ! website_dir scope scope_id level ! action action_class spops spops_class where iterator ! num_processed num_failed start_time end_time elapsed_time ); __PACKAGE__->mk_accessors( @FIELDS ); *************** *** 97,124 **** } ! if ( my $spops_class = $self->spops ) { ! if ( ! $spops_class->can( 'fetch' ) ) { ! $errors{class} = "Class '$spops_class' is not valid. Are you " . "sure it is defined in your OpenInteract setup?"; ! } ! elsif ( ! $spops_class->isa( 'SPOPS::Secure' ) ) { ! $errors{class} = "Class '$spops_class' is not using security."; } } ! elsif ( my $action_class = $self->action ) { ! if ( ! UNIVERSAL::isa( $action_class, 'OpenInteract2::Action' ) ) { ! $errors{class} = ! "Class '$action_class' does not seem to be a ", ! "subclass of 'OpenInteract2::Action'."; } } else { ! $errors{class} = "Class not set, must be set to the class of " . ! "the object for which you want to set security " . ! "(e.g., 'OpenInteract2::News')"; } --- 97,146 ---- } ! if ( my $spops_key = $self->spops ) { ! my $spops_class = eval { CTX->lookup_object( $spops_key ) }; ! if ( $spops_class ) { ! if ( ! $spops_class->can( 'fetch' ) ) { ! $errors{spops} = "Class '$spops_class' is not valid. Are you " . "sure it is defined in your OpenInteract setup?"; ! } ! elsif ( ! $spops_class->isa( 'SPOPS::Secure' ) ) { ! $errors{spops} = "Class '$spops_class' is not using security."; + } + else { + $self->spops_class( $spops_class ); + } + } + else { + $errors{spops} = + "Cannot find SPOPS class mapped to key '$spops_key'"; } } ! elsif ( my $action_name = $self->action ) { ! my $info = eval { CTX->lookup_action_info( $action_name ) }; ! if ( $info->{class} ) { ! if ( ! UNIVERSAL::isa( $info->{class}, 'OpenInteract2::Action' ) ) { ! $errors{action} = ! "Class '$info->{class}' does not seem to be a " . ! "subclass of 'OpenInteract2::Action'."; ! } ! else { ! $self->action_class( $info->{class} ); ! } ! ! } ! else { ! $errors{action} = ! "Cannot find action mapped to name '$action_name'"; } } else { ! $errors{class} = ! "Neither action name nor SPOPS key set. One must be set to " . ! "the class for which you want to set security (e.g., " . ! "'OpenInteract2::Action::News', 'OpenInteract2::News')"; } *************** *** 150,154 **** my ( $count, $failure ) = ( 0, 0 ); ! if ( my $spops_class = $self->spops ) { my ( $object_store ); if ( $self->iterator eq 'yes' ) { --- 172,176 ---- my ( $count, $failure ) = ( 0, 0 ); ! if ( my $spops_class = $self->spops_class ) { my ( $object_store ); if ( $self->iterator eq 'yes' ) { *************** *** 175,179 **** } ! elsif ( my $action_class = $self->action ) { my $ok = _create_or_update_security( $scope, $scope_id, $level, $action_class, '0', --- 197,201 ---- } ! elsif ( my $action_class = $self->action_class ) { my $ok = _create_or_update_security( $scope, $scope_id, $level, $action_class, '0', *************** *** 321,326 **** --- 343,352 ---- B<action> + B<action_class> (assigned after C<validate()>) + B<spops> + B<spops_class> (assigned after C<validate()>) + B<where> *************** *** 339,345 **** =head1 SEE ALSO ! L<OpenInteract2::Manage::Website::CreateSecurity> ! L<OpenInteract2::Manage::Website::CreateActionSecurity> =head1 COPYRIGHT --- 365,371 ---- =head1 SEE ALSO ! L<OpenInteract2::Manage::Website::CreateSecurityForAction> ! L<OpenInteract2::Manage::Website::CreateSecurityForSPOPS> =head1 COPYRIGHT |