Changeset 849 for LATMOS-Accounts
- Timestamp:
- 03/29/10 19:09:13 (14 years ago)
- Location:
- LATMOS-Accounts
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/bin/la-cli
r844 r849 10 10 =head1 NAME 11 11 12 la- query - Tools to query base in LATMOS::Accounts system12 la-cli - A powerfull commandline tool to manage LATMOS::Accounts contents 13 13 14 14 =head1 SYNOPSIS 15 15 16 la-query [options] [obj_id] 17 18 =item [obj_id] : If present, all set attributes (rw) will be displayed for that obj_id. 19 If none is given, all obj_ids will be printed. 20 21 For the default object_type (user), obj_id = login. 22 23 Example : la-query lambda 16 la-cli [options] 24 17 25 18 =cut 26 19 27 20 GetOptions( 28 'c|config=s' => \my $config,29 'b|base=s' => \my $base,30 'no exp' => \my $noexp,31 ' exp' => \my $exp,32 'help' => sub { pod2usage(0) },21 'c|config=s' => \my $config, 22 'b|base=s' => \my $base, 23 'no-unexp|wo-unexp' => \my $nounexp, 24 'with-unexp' => \my $unexp, 25 'help' => sub { pod2usage(0) }, 33 26 ) or pod2usage(); 34 27 … … 45 38 Query this specific base instead of the default one. 46 39 47 =item -- noexp40 =item --unexp 48 41 49 42 Take into account all objects (even non propagated ones, with attribute 'exported'=0) 50 43 51 =item -- exp44 =item --no-unexp 52 45 53 46 Take into account only propagated objects (attribute 'exported'=1) (default) … … 61 54 $labase && $labase->load or die "Cannot load base"; 62 55 63 $labase-> wexported($noexp ? 0 : 1);56 $labase->unexported($nounexp ? 0 : 1); 64 57 65 58 my $globalenv = LATMOS::Accounts::Cli::globalenv($labase); -
LATMOS-Accounts/bin/la-group
r669 r849 20 20 21 21 GetOptions( 22 'c|config=s' => \my $config,23 'b|base=s' => \my $base,24 's' => \my $set,25 'r' => \my $remove,26 'no exp' => \my $noexp,27 ' exp' => \my $exp,28 'help' => sub { pod2usage(0) },22 'c|config=s' => \my $config, 23 'b|base=s' => \my $base, 24 's' => \my $set, 25 'r' => \my $remove, 26 'no-unexp|wo-unexp' => \my $nounexp, 27 'with-unexp' => \my $unexp, 28 'help' => sub { pod2usage(0) }, 29 29 ) or pod2usage(); 30 30 … … 49 49 Query this specific base instead of the default one. 50 50 51 =item -- noexp51 =item --with-unexp 52 52 53 Take into account all objects (even non propagated ones, with attribute 'exported'=0) 53 Take into account all objects (even non propagated ones, with attribute 54 'exported'=0) (default) 54 55 55 =item -- exp56 =item --wo-unexp 56 57 57 Take into account only propagated objects (attribute 'exported'=1) (default)58 Take into account only propagated objects (attribute 'exported'=1) 58 59 59 60 =item -r … … 75 76 $labase && $labase->load or die "Cannot load base"; 76 77 77 $labase-> wexported($noexp ? 0 : 1);78 $labase->unexported($nounexp ? 0 : 1); 78 79 79 80 $labase->is_supported_object($otype) or die "$otype object unsupported\n"; -
LATMOS-Accounts/bin/la-guser
r669 r849 20 20 21 21 GetOptions( 22 'c|config=s' => \my $config,23 'b|base=s' => \my $base,24 's' => \my $set,25 'r' => \my $remove,26 'no exp' => \my $noexp,27 ' exp' => \my $exp,28 'help' => sub { pod2usage(0) },22 'c|config=s' => \my $config, 23 'b|base=s' => \my $base, 24 's' => \my $set, 25 'r' => \my $remove, 26 'no-unexp|wo-unexp' => \my $nounexp, 27 'with-exp' => \my $unexp, 28 'help' => sub { pod2usage(0) }, 29 29 ) or pod2usage(); 30 30 … … 49 49 Query this specific base instead of the default one. 50 50 51 =item -- noexp51 =item --with-unexp 52 52 53 Take into account all objects (even non propagated ones, with attribute 'exported'=0) 53 Take into account all objects (even non propagated ones, with attribute 54 'exported'=0) (default) 54 55 55 =item -- exp56 =item --wo-unexp 56 57 57 Take into account only propagated objects (attribute 'exported'=1) (default)58 Take into account only propagated objects (attribute 'exported'=1) 58 59 59 60 =item -r … … 75 76 $labase && $labase->load or die "Cannot load base"; 76 77 77 $labase-> wexported($noexp ? 0 : 1);78 $labase->unexported($nounexp ? 0 : 1); 78 79 79 80 $labase->is_supported_object($otype) or die "$otype object unsupported\n"; -
LATMOS-Accounts/bin/la-qacls
r669 r849 23 23 24 24 GetOptions( 25 'c|config=s' => \my $config,26 'b|base=s' => \my $base,27 'o|object=s' => \my $otype,28 'u|user=s' => \my $user,29 'no exp' => \my $noexp,30 'exp' => \my $exp,31 'help' => sub { pod2usage(0) },25 'c|config=s' => \my $config, 26 'b|base=s' => \my $base, 27 'o|object=s' => \my $otype, 28 'u|user=s' => \my $user, 29 'no-unexp|wo-unexp' => \my $nounexp, 30 'exp' => \my $unexp, 31 'help' => sub { pod2usage(0) }, 32 32 ) or pod2usage(); 33 33 … … 44 44 Query this specific base instead of the default one. 45 45 46 =item -- noexp46 =item --with-unexp 47 47 48 48 Take into account all objects (even non propagated ones, with attribute 'exported'=0) 49 49 50 =item -- exp50 =item --wo-unexp 51 51 52 52 Take into account only propagated objects (attribute 'exported'=1) (default) … … 66 66 my $labase = $base ? $LA->base($base) : $LA->default_base; 67 67 68 $labase-> wexported($noexp ? 0 : 1);68 $labase->unexported($unexp ? 1 : 0); 69 69 70 70 if ($user) { -
LATMOS-Accounts/bin/la-query
r827 r849 25 25 26 26 GetOptions( 27 'c|config=s' => \my $config,28 'b|base=s' => \my $base,29 'o|object=s' => \my $otype,30 'e|empty' => \my $empty_attr,31 'fmt=s' => \my $fmt,32 'filefmt=s' => \my $filefmt,33 'ro' => \my $with_ro,34 'no exp' => \my $noexp,35 ' exp' => \my $exp,36 'help' => sub { pod2usage(0) },27 'c|config=s' => \my $config, 28 'b|base=s' => \my $base, 29 'o|object=s' => \my $otype, 30 'e|empty' => \my $empty_attr, 31 'fmt=s' => \my $fmt, 32 'filefmt=s' => \my $filefmt, 33 'ro' => \my $with_ro, 34 'no-unexp|wo-unexp' => \my $nounexp, 35 'with-unexp' => \my $unexp, 36 'help' => sub { pod2usage(0) }, 37 37 ) or pod2usage(); 38 38 … … 55 55 Query will be performed on this object. Default is the 'User' object. 56 56 57 =item -- noexp57 =item --with-unexp 58 58 59 Take into account all objects (even non propagated ones, with attribute 'exported'=0) 59 Take into account all objects (even non propagated ones, with attribute 60 'exported'=0) (default) 60 61 61 =item -- exp62 =item --wo-unexp 62 63 63 Take into account only propagated objects (attribute 'exported'=1) (default)64 Take into account only propagated objects (attribute 'exported'=1) 64 65 65 66 =item -e|--empty … … 114 115 $labase && $labase->load or die "Cannot load base"; 115 116 116 $labase-> wexported($noexp ? 0 : 1);117 $labase->unexported($nounexp ? 0 : 1); 117 118 118 119 if ($filefmt){ -
LATMOS-Accounts/bin/la-search
r729 r849 27 27 Perform search in this specific base instead default 28 28 29 =item -- noexp29 =item --with-unexp 30 30 31 Take into account all objects (even non propagated ones, with attribute 'exported'=0) 31 Take into account all objects (even non propagated ones, with attribute 32 'exported'=0) (default) 32 33 33 =item -- exp34 =item --wo-unexp 34 35 35 Take into account only propagated objects (attribute 'exported'=1) (default)36 Take into account only propagated objects (attribute 'exported'=1) 36 37 37 38 =item --fmt format … … 77 78 78 79 GetOptions( 79 'c|config=s' => \my $config,80 'b|base=s' => \my $base,81 'o|object=s' => \my $otype,82 'fmt=s' => \my $fmt,83 'no exp' => \my $noexp,84 ' exp' => \my $exp,85 'help' => sub { pod2usage(0) },80 'c|config=s' => \my $config, 81 'b|base=s' => \my $base, 82 'o|object=s' => \my $otype, 83 'fmt=s' => \my $fmt, 84 'no-unexp|wo-unexp' => \my $nounexp, 85 'with-unexp' => \my $unexp, 86 'help' => sub { pod2usage(0) }, 86 87 ) or pod2usage(); 87 88 … … 94 95 $labase && $labase->load or die "Cannot load base"; 95 96 96 $labase-> wexported($noexp ? 0 : 1);97 $labase->unexported($nounexp ? 0 : 1); 97 98 98 99 my @result = $labase->search_objects($otype, @ARGV); -
LATMOS-Accounts/bin/la-web-directory
r833 r849 26 26 27 27 GetOptions( 28 'c|config=s' => \my $config,29 'b|base=s' => \my $base,30 ' noexp' => \my $noexp,31 ' exp' => \my $exp,32 'noexpire' => \my $noexpire,33 'filter=s' => \my @filters,34 'help' => sub { pod2usage(0) },28 'c|config=s' => \my $config, 29 'b|base=s' => \my $base, 30 'wo-unexp|no-unexp' => \my $nounexp, 31 'with-unexp' => \my $unexp, 32 'noexpire' => \my $noexpire, 33 'filter=s' => \my @filters, 34 'help' => sub { pod2usage(0) }, 35 35 ) or pod2usage(); 36 36 … … 47 47 Query this specific base instead of the default one. 48 48 49 =item -- noexp49 =item --with-unexp 50 50 51 51 Take into account all objects (even non propagated ones, with attribute 'exported'=0) 52 (default)53 52 54 =item -- exp53 =item --wo-unexp 55 54 56 Take into account only propagated objects (attribute 'exported'=1) 55 Take into account only propagated objects (attribute 'exported'=1) (default) 57 56 58 57 =item --noexpire … … 67 66 $labase && $labase->load or die "Cannot load base"; 68 67 69 $labase-> wexported($exp ? 1 : 0);68 $labase->unexported($unexp ? 1 : 0); 70 69 my %users; 71 70 my $now = strftime('%Y/%m/%d', gmtime); -
LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm
r783 r849 53 53 } 54 54 55 sub wexported { 55 sub wexported { unexported(@_) } 56 57 sub unexported { 56 58 my ($self, $wexported) = @_; 57 59 my $old = $self->{wexported}; -
LATMOS-Accounts/lib/LATMOS/Accounts/Cli.pm
r848 r849 17 17 my $env = LATMOS::Accounts::Cli->new({ prompt => sub { $_[0]->base->label . " cli > " }, }, 18 18 $labase); 19 $env->add_func('unexported', { 20 help => 'unexported yes|no|show - switch or show base mode regarding' . 21 ' unexported objects', 22 completion => sub { 23 if (!$_[2]) { 24 return qw(yes no show); 25 } 26 }, 27 code => sub { 28 my ($env, $arg) = @_; 29 if ($arg eq 'yes') { 30 $env->base->unexported(1); 31 print $OUT "Unexported are now show"; 32 } elsif ($arg eq 'no') { 33 $env->base->unexported(0); 34 print $OUT "Unexported are no longer show"; 35 } elsif ($arg eq 'show') { 36 print $OUT "Unexported objects " . $env->base->unexported ? 37 "enable" : "disable"; 38 } else { 39 print $OUT "wrong argument"; 40 } 41 }, 42 }); 19 43 $env->add_func('ls', { 20 44 help => 'ls object_type - list object of type object_type',
Note: See TracChangeset
for help on using the changeset viewer.