[Rt-commit] r15519 - in rt/branches/3.999-DANGEROUS: t/web
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Aug 27 08:04:59 EDT 2008
Author: sunnavy
Date: Wed Aug 27 08:04:51 2008
New Revision: 15519
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/t/web/dashboards-groups.t
rt/branches/3.999-DANGEROUS/t/web/dashboards.t
Log:
r16150 at sunnavys-mb: sunnavy | 2008-08-27 18:55:40 +0800
RT->system for global right, not RT->system_user
Modified: rt/branches/3.999-DANGEROUS/t/web/dashboards-groups.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/dashboards-groups.t (original)
+++ rt/branches/3.999-DANGEROUS/t/web/dashboards-groups.t Wed Aug 27 08:04:51 2008
@@ -26,8 +26,9 @@
# grant the user all these rights so we can make sure that the group rights
# are checked and not these as well
-$user_obj->principal_object->grant_right(right => $_, object => RT->system_user)
+$user_obj->principal_object->grant_right(right => $_, object => RT->system )
for qw/SubscribeDashboard CreateOwnDashboard SeeOwnDashboard ModifyOwnDashboard DeleteOwnDashboard/;
+
# }}}
# create and test groups (outer < inner < user) {{{
my $inner_group = RT::Model::Group->new(current_user => RT->system_user);
@@ -42,7 +43,7 @@
ok($ok, "added inner as a member of outer: $msg");
($ok, $msg) = $inner_group->add_member($user_obj->principal_id);
-ok($ok, "added user as a member of member: $msg");
+ok($ok, "added user as a member of inner $msg");
ok($outer_group->has_member($inner_group->principal_id), "outer has inner");
ok(!$outer_group->has_member($user_obj->principal_id), "outer doesn't have user directly");
Modified: rt/branches/3.999-DANGEROUS/t/web/dashboards.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/dashboards.t (original)
+++ rt/branches/3.999-DANGEROUS/t/web/dashboards.t Wed Aug 27 08:04:51 2008
@@ -80,8 +80,8 @@
$m->follow_link_ok({text => "Basics"});
$m->content_contains("Modify the dashboard different dashboard");
-
$m->follow_link_ok({text => "Queries"});
+
$m->content_contains("Modify the queries of dashboard different dashboard");
$m->form_name( 'dashboard_queries' );
$m->field('searches-Available' => ["2-RT::System-1"]);
@@ -143,7 +143,7 @@
RT::Record->flush_cache if RT::Record->can('FlushCache');
is($user_obj->attributes->named('Subscription'), 0, "no subscriptions");
-$user_obj->principal_object->grant_right(right => 'SubscribeDashboard', object => RT->system_user);
+$user_obj->principal_object->grant_right(right => 'SubscribeDashboard', object => RT->system );
$m->get_ok("/Dashboards/Modify.html?id=$id");
$m->follow_link_ok({text => "Subscription"});
@@ -170,7 +170,7 @@
$m->get_ok("/Dashboards/Modify.html?id=$id&Delete=1");
$m->content_contains("Permission denied", "unable to delete dashboard because we lack DeleteOwnDashboard");
-$user_obj->principal_object->grant_right(right => 'DeleteOwnDashboard', object => RT->system_user);
+$user_obj->principal_object->grant_right(right => 'DeleteOwnDashboard', object => RT->system );
$m->get_ok("/Dashboards/Modify.html?id=$id");
$m->content_contains('Delete', "Delete button shows because we have DeleteOwnDashboard");
More information about the Rt-commit
mailing list