}
}
+sub is_any_admin_user : Global {
+ my ( $self, $c ) = @_;
+
+ eval {
+ if ( $c->assert_any_user_role( qw/admin user/ ) ) {
+ $c->res->body( 'ok' );
+ }
+ };
+ if ($@) {
+ $c->res->body( 'failed' );
+ }
+}
+
+sub is_nonexistant_roles: Global {
+ my ( $self, $c ) = @_;
+
+ eval {
+ if ( $c->assert_user_roles( qw/madeUProle baconHater/ ) ) {
+ $c->res->body( 'ok' );
+ }
+ };
+ if ($@) {
+ $c->res->body( 'failed' );
+ }
+}
+
+sub is_any_nonexistant_role: Global {
+ my ( $self, $c ) = @_;
+
+ eval {
+ if ( $c->assert_any_user_role( qw/madeUProle baconHater/ ) ) {
+ $c->res->body( 'ok' );
+ }
+ };
+ if ($@) {
+ $c->res->body( 'failed' );
+ }
+}
+
+
sub set_usersession : Global {
my ( $self, $c, $value ) = @_;
$c->user_session->{foo} = $value;