[Rt-commit] r10594 - in rt/branches/3.999-DANGEROUS: lib/RT/Model
ruz at bestpractical.com
ruz at bestpractical.com
Wed Jan 30 16:51:07 EST 2008
Author: ruz
Date: Wed Jan 30 16:51:06 2008
New Revision: 10594
Modified:
rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm
rt/branches/3.999-DANGEROUS/t/api/user.t
Log:
* return back CreateTicket right for a while
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm Wed Jan 30 16:51:06 2008
@@ -139,7 +139,7 @@
Watch => 'Sign up as a ticket Requestor or ticket or queue Cc', # loc_pair
WatchAsAdminCc => 'Sign up as a ticket or queue AdminCc', # loc_pair
- create_ticket => 'Create tickets in this queue', # loc_pair
+ CreateTicket => 'Create tickets in this queue', # loc_pair
ReplyToTicket => 'Reply to tickets', # loc_pair
CommentOnTicket => 'comment on tickets', # loc_pair
OwnTicket => 'Own tickets', # loc_pair
Modified: rt/branches/3.999-DANGEROUS/t/api/user.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/user.t (original)
+++ rt/branches/3.999-DANGEROUS/t/api/user.t Wed Jan 30 16:51:06 2008
@@ -102,7 +102,7 @@
$rootq->load(1);
ok($rootq->id, "Loaded the first queue");
-ok ($rootq->current_user->has_right(right=> 'create_ticket', object => $rootq), "Root can create tickets");
+ok ($rootq->current_user->has_right(right=> 'CreateTicket', object => $rootq), "Root can create tickets");
my $new_user = RT::Model::User->new(current_user => RT->system_user);
my ($id, $msg) = $new_user->create(name => 'ACLTest'.$$);
@@ -114,15 +114,15 @@
ok($q->id, "Loaded the first queue");
-ok (!$q->current_user->has_right(right => 'create_ticket', object => $q), "Some random user doesn't have the right to create tickets");
-ok (my ($gval, $gmsg) = $new_user->principal_object->grant_right( right => 'create_ticket', object => $q), "Granted the random user the right to create tickets");
+ok (!$q->current_user->has_right(right => 'CreateTicket', object => $q), "Some random user doesn't have the right to create tickets");
+ok (my ($gval, $gmsg) = $new_user->principal_object->grant_right( right => 'CreateTicket', object => $q), "Granted the random user the right to create tickets");
ok ($gval, "Grant succeeded - $gmsg");
-ok ($q->current_user->has_right(right => 'create_ticket', object => $q), "The user can create tickets after we grant him the right");
-ok ( ($gval, $gmsg) = $new_user->principal_object->revoke_right( right => 'create_ticket', object => $q), "revoked the random user the right to create tickets");
+ok ($q->current_user->has_right(right => 'CreateTicket', object => $q), "The user can create tickets after we grant him the right");
+ok ( ($gval, $gmsg) = $new_user->principal_object->revoke_right( right => 'CreateTicket', object => $q), "revoked the random user the right to create tickets");
ok ($gval, "Revocation succeeded - $gmsg");
-ok (!$q->current_user->has_right(right => 'create_ticket', object => $q), "The user can't create tickets anymore");
+ok (!$q->current_user->has_right(right => 'CreateTicket', object => $q), "The user can't create tickets anymore");
More information about the Rt-commit
mailing list