[Jifty-commit] r4186 - in apps/CASPlus/trunk: lib/CASPlus
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Oct 2 12:03:54 EDT 2007
Author: sterling
Date: Tue Oct 2 12:03:53 2007
New Revision: 4186
Modified:
apps/CASPlus/trunk/ (props changed)
apps/CASPlus/trunk/lib/CASPlus/Dispatcher.pm
Log:
r12777 at dynpc145: andrew | 2007-10-02 10:40:49 -0500
* Fixing up some of the menu items.
* Adding support for the role recalculation action in the dispatcher.
* Adding support for the service logout parameter.
Modified: apps/CASPlus/trunk/lib/CASPlus/Dispatcher.pm
==============================================================================
--- apps/CASPlus/trunk/lib/CASPlus/Dispatcher.pm (original)
+++ apps/CASPlus/trunk/lib/CASPlus/Dispatcher.pm Tue Oct 2 12:03:53 2007
@@ -137,6 +137,12 @@
url => '/admin/user/users',
description => _('Manage the user accounts that may authenticate against the CAS server.'),
);
+
+ $users->child( RecalculateRoles =>
+ label => _('Recalculate Roles'),
+ url => '/admin/users/recalculate',
+ description => _('Recalculate the roles for a given user.'),
+ );
}
if ($current_user->may_manage_roles) {
$users->child( Role =>
@@ -234,14 +240,16 @@
# Setup the main menu for administrator
{
+ if (Jifty->web->current_user->may_administrate) {
- # Add the Administer item to main navigation
- my $nav = Jifty->web->navigation;
- $nav->child( Administer =>
- label => _('Administer'),
- url => '/admin',
- sort_order => 50,
- );
+ # Add the Administer item to main navigation
+ my $nav = Jifty->web->navigation;
+ $nav->child( Administer =>
+ label => _('Administer'),
+ url => '/admin',
+ sort_order => 50,
+ );
+ }
}
# Add the profile link for logged users
@@ -451,7 +459,12 @@
on 'logout' => run {
if (Jifty->config->app('Login')->{'AllowLogout'}) {
- my $logout = Jifty->web->new_action( class => 'Logout' );
+ my $logout = Jifty->web->new_action(
+ class => 'Logout',
+ arguments => {
+ service => get 'service',
+ },
+ );
$logout->run;
show '/logout';
@@ -680,7 +693,7 @@
=cut
-on 'admin/object/*' => run {
+on [ 'admin/object/*', 'admin/object/*/**' ] => run {
my $name = $1;
# Load the associated profile
@@ -696,9 +709,6 @@
unless (Template::Declare->resolve_template($path)) {
CASPlus::View::_register_crud($path, $name, $profile->record_class);
}
-
- # Show that CRUD view!
- show $path;
};
=head2 /admin/relationship/*
@@ -707,7 +717,7 @@
=cut
-on 'admin/relationship/*' => run {
+on [ 'admin/relationship/*', 'admin/relationship/*/**' ] => run {
my $name = $1;
# Load the link table
@@ -730,9 +740,20 @@
CASPlus::View::_register_crud($path, $name,
$relationship->record_class);
}
+};
- # Show that CRUD view!
- show $path;
+=head2 /admin/users/recalculate
+
+Setup the role recalculation action.
+
+=cut
+
+on '/admin/users/recalculate' => run {
+ my $action = Jifty->web->new_action(
+ class => 'RecalculateRoles',
+ );
+
+ set action => $action;
};
=head2 /error, /error/**
More information about the Jifty-commit
mailing list