# 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: Request4.bunit,v 1.3 2010/01/10 18:01:14 nagler Exp $ Request('initialize_fully'); my($resource) = b_use('Bivio::Agent::t::Mock::Resource')->new; [ sub {req()} => [ { method => 'can_user_execute_task', compute_params => sub { my(undef, $params) = @_; req()->set_user(shift(@$params)); return $params; }, } => [ [qw(guest TEST_MULTI_ROLES1)] => 0, [qw(multi_role_user TEST_MULTI_ROLES1)] => 1, [multi_role_user => Agent_Task()->get_by_id('TEST_MULTI_ROLES2')] => 1, ], { method => 'is_site_admin', compute_params => sub { my(undef, $params) = @_; req()->set_user(shift(@$params)); return []; }, } => [ btest_read => 0, root => 1, ], ], ];