[Rt-commit] rt branch, admin_ui, updated. c41aa478639c5cc38e38ca651de6658b1b8ea604

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Dec 10 20:09:13 EST 2009


The branch, admin_ui has been updated
       via  c41aa478639c5cc38e38ca651de6658b1b8ea604 (commit)
      from  b8f1aae52bb3841c15b9f0f9a2828514967ecb79 (commit)

Summary of changes:
 lib/RT/View/Admin/Global.pm |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit c41aa478639c5cc38e38ca651de6658b1b8ea604
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Dec 11 09:08:42 2009 +0800

    user_rights and group_rights in /admin/global/

diff --git a/lib/RT/View/Admin/Global.pm b/lib/RT/View/Admin/Global.pm
index 5321c6a..40e1378 100644
--- a/lib/RT/View/Admin/Global.pm
+++ b/lib/RT/View/Admin/Global.pm
@@ -120,5 +120,33 @@ template 'system' => page { title => _('Configure RT') } content {
     }
 }
 
+private template 'rights' => sub {
+    my $self = shift;
+    my $type = shift || 'user';
+
+    my $class   = 'Edit' . ucfirst($type) . 'Rights';
+    my $moniker = 'modify_' . $type . '_rights';
+
+    my $rights = new_action(
+        class   => $class,
+        moniker => $moniker,
+    );
+
+    $rights->object( RT->system );
+
+    with( name => $moniker ), form {
+        render_action($rights);
+        form_submit( label => _('Save') );
+    };
+};
+
+template 'user_rights' => page { title => _('Modify User Rights') } content {
+    show( 'rights', 'user' );
+};
+
+template 'group_rights' => page { title => _('Modify Group Rights') } content {
+    show( 'rights', 'group' );
+};
+
 1;
 

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


More information about the Rt-commit mailing list