Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6705951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:27:48+00:00 2026-05-26T07:27:48+00:00

If a module requires a claim, and the user does not have the claim

  • 0

If a module requires a claim, and the user does not have the claim a 403 response is returned.
eg:

this.RequiresClaims(new[] { "SuperSecure" });

or

this.RequiresValidatedClaims(c => c.Contains("SuperSecure"));

but that just returns a blank page to the user.

How do I deal with a user not having the required claim?
Can I ‘catch’ the 403 and redirect?

The RequiresClaims method returns void or uses the pre-request hook to throw back a HttpStatusCode.Forbidden. What should I do so the user knows what has happened?

Many Thanks,
Neil

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:27:49+00:00Added an answer on May 26, 2026 at 7:27 am

    You can catch it either by writing your own post request hook (either at the app level, or the module level) or by implementing your own IErrorHandler, probably wrapping the default one.

    The error handler stuff is going to change so you will be able to register multiple ones (for different error codes), it’s setup to do that (with the “can/do” interface) but for some reason my brain didn’t add it as a collection 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this module does a good job at creating a tagcloud block - all good
Hello I have this problem with PyQt4-dev-tools that include: * a user interface compiler
I have a multi-module maven build that requires a profile to be activated only
In an Android module, does an activity requires Handler to be defined ?
I have a drupal module that requires other files from the web. Is it
I'm working on a module that requires a strictly decoupled interface. Specifically, after instantiating
This module is part of a simple todo app I made with Python... def
I'm working on a custom DotNetNuke module which requires the use of Lightbox. What's
I'm doing some LINQ which requires a custom comparer, so I created a new
I want to simulate MyApp that imports a module (ResourceX) which requires a resource

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.