@@ -1232,6 +1232,9 @@ the user is not logged in, they will be redirected to the login page URL. If
12321232they are logged in, but do not have the required role, they will be redirected
12331233to the access denied URL.
12341234
1235+ If C<disable_roles > configuration option is set to a true value then using
1236+ L</require_role> will cause the application to croak on load.
1237+
12351238=item require_any_roles - require the user to have one of a list of roles
12361239
12371240 get '/drink' => require_any_role [qw(BeerDrinker VodaDrinker)] => sub {
@@ -1243,6 +1246,9 @@ roles listed. If the user is not logged in, they will be redirected to the
12431246login page URL. If they are logged in, but do not have any of the specified
12441247roles, they will be redirected to the access denied URL.
12451248
1249+ If C<disable_roles > configuration option is set to a true value then using
1250+ L</require_any_roles> will cause the application to croak on load.
1251+
12461252=item require_all_roles - require the user to have all roles listed
12471253
12481254 get '/foo' => require_all_roles [qw(Foo Bar)] => sub { ... };
@@ -1252,6 +1258,9 @@ If the user is not logged in, they will be redirected to the login page URL. If
12521258they are logged in but do not have all of the specified roles, they will be
12531259redirected to the access denied URL.
12541260
1261+ If C<disable_roles > configuration option is set to a true value then using
1262+ L</require_all_roles> will cause the application to croak on load.
1263+
12551264=back
12561265
12571266=head2 Replacing the Default C< /login > and C< /login/denied > Routes
@@ -1381,6 +1390,9 @@ You can also provide the username to check;
13811390
13821391 if (user_has_role($user, $role)) { .... }
13831392
1393+ If C<disable_roles > configuration option is set to a true value then using
1394+ L</user_has_role> will cause the application to croak at runtime.
1395+
13841396=item user_roles
13851397
13861398Returns a list of the roles of a user.
@@ -1390,6 +1402,9 @@ alternatively, you may supply a username to check.
13901402
13911403Returns a list or arrayref depending on context.
13921404
1405+ If C<disable_roles > configuration option is set to a true value then using
1406+ L</user_roles> will cause the application to croak at runtime.
1407+
13931408=item authenticate_user
13941409
13951410Usually you'll want to let the built-in login handling code deal with
0 commit comments