Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ METHODS
'privileges' will use the supplied `user_privs' subroutine ref and
return the privileges of the current session. You can pass additional
data along in the extra_data hashref and it will be passed to your
`user_privs' subroutine as-is. The returned data is dependant on the
`user_privs' subroutine as-is. The returned data is dependent on the
supplied `user_privs' subroutine.

role($extra_data)
'role' will use the supplied `user_role' subroutine ref and return the
role of the current session. You can pass additional data along in the
extra_data hashref and it will be passed to your `user_role' subroutine
as-is. The returned data is dependant on the supplied `user_role'
as-is. The returned data is dependent on the supplied `user_role'
subroutine.

CONFIGURATION
Expand Down Expand Up @@ -200,7 +200,7 @@ ACKNOWLEDGEMENTS

Dmitry Karasik

- Fix for depricated 'over' command
- Fix for deprecated 'over' command

LICENSE AND COPYRIGHT
Copyright 2012 John Scoles. This program is free software; you can
Expand Down
4 changes: 2 additions & 2 deletions README.pod
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ subroutine as-is.

'pPrivileges'' will use the supplied C<user_privs> subroutine ref and return the privileges of the current session.
You can pass additional data along in the extra_data hashref and it will be passed to your C<user_privs>
subroutine as-is. The returned data is dependant on the supplied C<user_privs> subroutine.
subroutine as-is. The returned data is dependent on the supplied C<user_privs> subroutine.

=head2 role($extra_data)

'role' will use the supplied C<user_role> subroutine ref and return the role of the current session.
You can pass additional data along in the extra_data hashref and it will be passed to your C<user_role>
subroutine as-is. The returned data is dependant on the supplied C<user_role> subroutine.
subroutine as-is. The returned data is dependent on the supplied C<user_role> subroutine.

=head1 CONFIGURATION

Expand Down
14 changes: 7 additions & 7 deletions example/showoff-authorization.pl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ =head1 Invocation
=head1 Notes
My first crack at a Mojo plugin a steal from Ben van Staveren's Authentication so I owe him and some others
a great note of thanks
Like Authentication this is a very a simple application. It supplies the framwork and you have to give it
the guts which this little progam shows.
Like Authentication this is a very a simple application. It supplies the framework and you have to give it
the guts which this little program shows.
I did not add in any Authentication as that is up to you to build. In this test I just assume you are
authenticated on the session and that session has a role hash on it.
=head1 Versions
Expand Down Expand Up @@ -133,13 +133,13 @@ =head1 Versions
<p>Go the trials as The <a href="/change/hypnotoad">Hypnotoad</a>.</p>
@@ dogshow.html.ep
% layout 'default';
% title 'Pan Galatic Sheep Dog Trials';
<p>Welcome "<%= $role_name %>" to the the Pan Galatic Sheep Dog Trials.</p>
% title 'Pan Galactic Sheep Dog Trials';
<p>Welcome "<%= $role_name %>" to the the Pan Galactic Sheep Dog Trials.</p>
<a href="/">Go home</a><br>
<a href="/view">View a Trial</a><br>
<a href="/herd">Herd some Sheep</a><br>
<a href="/judge">Judge a trial</a><br>
<a href="/my_privs">What are my Privleges</a>
<a href="/my_privs">What are my Privileges</a>
@@ view.html.ep
% layout 'default';
% title 'View Trials';
Expand Down Expand Up @@ -168,7 +168,7 @@ =head1 Versions
@@ my_privs.html.ep
% layout 'default';
% title 'My Privleges';
<h1>Privleges</h1>
<h1>Privileges</h1>
%foreach my $priv (@{$privs}) {
<%==$priv%> <br>
%}
Expand All @@ -183,7 +183,7 @@ =head1 Versions
@@ not_allowed.html.ep
% layout 'default';
% title 'Page Unavailable';
<h1>I am sorry do to interferance from suicide booths on 'Eminiar VII' you cannot get to this page</h1>
<h1>I am sorry do to interference from suicide booths on 'Eminiar VII' you cannot get to this page</h1>
@@ layouts/default.html.ep
<!DOCTYPE html>
<html>
Expand Down