OpenInteract2::Manage::Website::CreateSecurityForSPOPS - Create security for multiple SPOPS objects
#!/usr/bin/perl use strict; use OpenInteract2::Manage; my $website_dir = '/home/httpd/mysite'; my %PARAMS = ( scope => 'group', scope_id => 4, spops => 'news', level => 'read', website_dir => $website_dir, ); my $task = OpenInteract2::Manage->new( 'secure_spops', \%PARAMS ); my @status = $task->execute; foreach my $s ( @status ) { my $ok_label = ( $s->{is_ok} eq 'yes' ) ? 'OK' : 'NOT OK'; print "Status OK? $s->{is_ok}\n", "$s->{message}\n"; }
Scope of security you're setting
Scope ID of security you're setting. Ignored with 'world' scope.
The key used for the SPOPS objects you're trying to add security to. For instance you'd use 'news' if you're trying to add security to 'OpenInteract2::News' objects.
If you want to restrict the objects you assign security to pass in a WHERE clause. For instance, if you want to only set security for objects created this year:
oi2_manage create_spops_security ... --where "posted_on >= '2005-01-01'"
Each status hashref includes:
Set to 'yes' if the task succeeded, 'no' if not.
Success/failure message.
OpenInteract2::CreateSecurity
Copyright (C) 2003-2005 Chris Winters. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Chris Winters <chris@cwinters.com>
To install OpenInteract2::URL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenInteract2::URL
CPAN shell
perl -MCPAN -e shell install OpenInteract2::URL
For more information on module installation, please visit the detailed CPAN module installation guide.