[Bps-public-commit] RT-Extension-rt_cpan_org branch, rt4, updated. 4e12eb7feb768358a26e3d32afc4c99c9a0b1c97

Thomas Sibley trs at bestpractical.com
Thu Apr 4 21:02:17 EDT 2013


The branch, rt4 has been updated
       via  4e12eb7feb768358a26e3d32afc4c99c9a0b1c97 (commit)
      from  7157bec65204473d468c6be90c90f1ba7bc53ddf (commit)

Summary of changes:
 etc/CPAN_Config.pm         |  1 +
 etc/upgrade/4.0/content    | 12 ++++++++++++
 lib/RT/Principal_Vendor.pm |  2 +-
 3 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 etc/upgrade/4.0/content

- Log -----------------------------------------------------------------
commit 4e12eb7feb768358a26e3d32afc4c99c9a0b1c97
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Apr 4 17:54:59 2013 -0700

    Add the OpenTicket transition right and deny it to the public user
    
    There's still a Privileged/Unprivileged split between Bitcard and OpenID
    users internally, so denying it is unfortunately necessary.

diff --git a/etc/CPAN_Config.pm b/etc/CPAN_Config.pm
index 9bea664..522e98f 100644
--- a/etc/CPAN_Config.pm
+++ b/etc/CPAN_Config.pm
@@ -83,6 +83,7 @@ Set( %Lifecycles,
             deleted  => [qw(new open stalled patched rejected resolved)],
         },
         rights => {
+            '* -> open'     => 'OpenTicket',
             '* -> deleted'  => 'DeleteTicket',
             '* -> *'        => 'ModifyTicket',
         },
diff --git a/etc/upgrade/4.0/content b/etc/upgrade/4.0/content
new file mode 100644
index 0000000..0549112
--- /dev/null
+++ b/etc/upgrade/4.0/content
@@ -0,0 +1,12 @@
+use strict;
+use warnings;
+
+our @ACL = (
+    {
+        Right       => 'OpenTicket',
+        GroupDomain => 'SystemInternal',
+        GroupType   => 'Everyone',
+    }
+);
+
+1;
diff --git a/lib/RT/Principal_Vendor.pm b/lib/RT/Principal_Vendor.pm
index 5c4798d..1070a43 100644
--- a/lib/RT/Principal_Vendor.pm
+++ b/lib/RT/Principal_Vendor.pm
@@ -71,7 +71,7 @@ my $HasRight = __PACKAGE__->can("HasRight")
     my $public = RT->Config->Get("WebPublicUser");
 
     if ($public and lc $self->Object->__Value('Name') eq lc $public
-        and $args{Right} =~ /^(Create|ReplyTo)Ticket$/) {
+        and $args{Right} =~ /^(Create|ReplyTo|Open)Ticket$/) {
 
         return (undef);
     }

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list