[Catalyst-commits] r8246 - in
trunk/Catalyst-Plugin-Authorization-Roles: .
lib/Catalyst/Plugin/Authorization
bricas at dev.catalyst.perl.org
bricas at dev.catalyst.perl.org
Thu Aug 21 14:04:13 BST 2008
Author: bricas
Date: 2008-08-21 14:04:13 +0100 (Thu, 21 Aug 2008)
New Revision: 8246
Modified:
trunk/Catalyst-Plugin-Authorization-Roles/Changes
trunk/Catalyst-Plugin-Authorization-Roles/Makefile.PL
trunk/Catalyst-Plugin-Authorization-Roles/lib/Catalyst/Plugin/Authorization/Roles.pm
Log:
switch to module::install. update changes. bump version. remove tab chars.
Modified: trunk/Catalyst-Plugin-Authorization-Roles/Changes
===================================================================
--- trunk/Catalyst-Plugin-Authorization-Roles/Changes 2008-08-21 11:24:21 UTC (rev 8245)
+++ trunk/Catalyst-Plugin-Authorization-Roles/Changes 2008-08-21 13:04:13 UTC (rev 8246)
@@ -1,10 +1,13 @@
Revision history for Perl extension Catalyst::Plugin::Authorization::Roles
-0.06
+0.07 2008-08-21
+ - repackaged
+
+0.06 2008-08-20
- support renamed Catalyst::Authentication::* modules
- removed dependency on Test::MockObject
-0.05
+0.05 2006-10-13
- fix tests due to a change in Test::MockObject
- add support for check_any style role checks.
Modified: trunk/Catalyst-Plugin-Authorization-Roles/Makefile.PL
===================================================================
--- trunk/Catalyst-Plugin-Authorization-Roles/Makefile.PL 2008-08-21 11:24:21 UTC (rev 8245)
+++ trunk/Catalyst-Plugin-Authorization-Roles/Makefile.PL 2008-08-21 13:04:13 UTC (rev 8246)
@@ -1,15 +1,21 @@
-use ExtUtils::MakeMaker;
-WriteMakefile(
- 'NAME' => 'Catalyst::Plugin::Authorization::Roles',
- 'VERSION_FROM' => 'lib/Catalyst/Plugin/Authorization/Roles.pm',
- 'PREREQ_PM' => {
- 'Catalyst' => '5.49',
- 'Catalyst::Plugin::Authentication' => '0.10003',
- 'Set::Object' => '1.14',
- 'Test::Exception' => '0',
- 'UNIVERSAL::isa' => '0.05'
- },
- 'INSTALLDIRS' => 'site',
- 'PL_FILES' => {},
- 'SIGN' => 1,
-);
+use inc::Module::Install 0.77;
+
+if ( -e 'MANIFEST.SKIP' ) {
+ system( 'pod2text lib/Catalyst/Plugin/Authorization/Roles.pm > README' );
+}
+
+perl_version '5.008';
+
+name 'Catalyst-Plugin-Authorization-Roles';
+all_from 'lib/Catalyst/Plugin/Authorization/Roles.pm';
+
+requires 'Catalyst::Runtime' => '5.0';
+requires 'Catalyst::Plugin::Authentication' => '0.10003';
+requires 'Set::Object' => '1.14';
+requires 'UNIVERSAL::isa' => '0.05';
+
+test_requires 'Test::More';
+test_requires 'Test::Exception';
+
+auto_install;
+WriteAll;
Modified: trunk/Catalyst-Plugin-Authorization-Roles/lib/Catalyst/Plugin/Authorization/Roles.pm
===================================================================
--- trunk/Catalyst-Plugin-Authorization-Roles/lib/Catalyst/Plugin/Authorization/Roles.pm 2008-08-21 11:24:21 UTC (rev 8245)
+++ trunk/Catalyst-Plugin-Authorization-Roles/lib/Catalyst/Plugin/Authorization/Roles.pm 2008-08-21 13:04:13 UTC (rev 8246)
@@ -9,7 +9,7 @@
use Scalar::Util ();
use Catalyst::Exception ();
-our $VERSION = "0.06";
+our $VERSION = '0.07';
sub check_user_roles {
my ( $c, @roles ) = @_;
@@ -133,19 +133,19 @@
=head1 SYNOPSIS
- use Catalyst qw/
- Authentication
- Authentication::Store::ThatSupportsRoles
- Authorization::Roles
- /;
+ use Catalyst qw/
+ Authentication
+ Authentication::Store::ThatSupportsRoles
+ Authorization::Roles
+ /;
- sub delete : Local {
- my ( $self, $c ) = @_;
+ sub delete : Local {
+ my ( $self, $c ) = @_;
- $c->assert_user_roles( qw/admin/ ); # only admins can delete
+ $c->assert_user_roles( qw/admin/ ); # only admins can delete
- $c->model("Foo")->delete_it();
- }
+ $c->model("Foo")->delete_it();
+ }
=head1 DESCRIPTION
@@ -162,11 +162,11 @@
probably want to check that the user is allowed to edit. To do this, create an
editor role, and add that role to every user who is allowed to edit.
- sub edit : Local {
- my ( $self, $c ) = @_;
- $c->assert_user_roles( qw/editor/ );
- $c->model("TheModel")->make_changes();
- }
+ sub edit : Local {
+ my ( $self, $c ) = @_;
+ $c->assert_user_roles( qw/editor/ );
+ $c->model("TheModel")->make_changes();
+ }
When this plugin checks the roles of a user it will first see if the user
More information about the Catalyst-commits
mailing list