# 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: GroupUserList.bunit,v 1.7 2010/03/10 22:38:42 moeller Exp $ ListModel(); req()->set_realm_and_user('fourem'); req()->initialize_fully('GROUP_USER_LIST'); model('RealmUserAddForm', { 'Email.email' => email('delete'), 'RealmOwner.display_name' => 'Bunit_deleted User', 'RealmOwner.password' => 'password', }); foreach my $args ( [qw(leave_user)], [qw(join_user WITHDRAWN)], ) { b_use('ShellUtil.RealmAdmin')->main( qw(-r fourem -u), email('delete'), @$args); } [ load_all => [ [{ # Sort by first name order_by => '2a', }] => [{ privileges => StringArray([qw(Member Subscribed)]), is_not_withdrawn => 1, display_name => 'User, Btest_admin', }, { privileges => StringArray([qw(Member Subscribed)]), is_not_withdrawn => 1, display_name => 'User, Btest_read', }, { privileges => StringArray([qw(Admin Editor Subscribed)]), is_not_withdrawn => 1, display_name => 'User, Root', }], ], set_cursor => [ 2 => not_die(), ], roles_by_category => [ [] => [ [Auth_Role('ADMINISTRATOR')], [Auth_Role('FILE_WRITER'), Auth_Role('MAIL_RECIPIENT')], ], [[map(Auth_Role($_), qw(GUEST FILE_WRITER ADMINISTRATOR))]] => [ [Auth_Role('ADMINISTRATOR'), Auth_Role('GUEST')], [Auth_Role('FILE_WRITER')], ], ], { method => 'load_all', compute_params => sub { my(undef, $params) = @_; model(GroupUserQueryForm => {@$params}); return []; } } => [ [b_privilege => 'Admin'] => [{ privileges => StringArray([qw(Admin Editor Subscribed)]), display_name => 'User, Root', }], [b_filter => 'read@'] => [{ privileges => StringArray([qw(Member Subscribed)]), display_name => 'User, Btest_read', }], [b_privilege => 'Former Member'] => [{ privileges => StringArray(['Former Member']), is_not_withdrawn => 0, display_name => 'User, Bunit_deleted', }], ] ];