# Copyright (c) 2008 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: RealmUser.bunit,v 1.6 2010/03/11 00:50:18 nagler Exp $ ShellUtil(); foreach my $x ( [qw(demo MEMBER)], [qw(root ADMINISTRATOR)], ) { my($u) = shift(@$x); foreach my $n (1..4) { ShellUtil_RealmAdmin()->main( -realm => "realm_user_util$n", -user => $u, 'leave_user'); } ShellUtil_RealmAdmin()->main( qw(-realm realm_user_util1 -user), $u, join_user => @$x); } ShellUtil_RealmAdmin()->main( qw(-realm realm_user_util3 -user demo join_user MAIL_RECIPIENT), ); ShellUtil_RealmAdmin()->main( qw(-realm realm_user_util3 -user root join_user WITHDRAWN), ); ShellUtil_RealmAdmin()->main( qw(-realm realm_user_util4 -user demo join_user MEMBER)); [ [qw(-user demo audit_user)] => qr{DIE}, [qw(-realm fourem -user user audit_user)] => qr{DIE}, [qw(-realm fourem -user demo audit_user)] => [], [qw(-realm realm_user_util1 audit_all_users)] => <<'EOF', demo: realm_user_util2: +MAIL_RECIPIENT +MEMBER realm_user_util3: -MAIL_RECIPIENT root: realm_user_util2: +ADMINISTRATOR +FILE_WRITER +MAIL_RECIPIENT realm_user_util3: +ADMINISTRATOR +FILE_WRITER +MAIL_RECIPIENT -WITHDRAWN realm_user_util4: +GUEST EOF [qw(-realm realm_user_util1 audit_all_users)] => [], ];