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

  • SEARCH
  • Home
  • 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 8133447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:36:32+00:00 2026-06-06T09:36:32+00:00

Is there a sensible way to determine whether the current user can access an

  • 0

Is there a sensible way to determine whether the current user can access an action on a different controller, based on the accessRules for that controller and the accessControl filter?

For example, I don’t want to display a link that goes to a controller action that the user doesn’t have permission to access, based on their role and the rules defined in that controller’s accessRules().

  • 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-06-06T09:36:33+00:00Added an answer on June 6, 2026 at 9:36 am

    I believe the answer is no different due to how Yii handles it’s controllers.

    The only way would be to parse the controller yourself and add its own rules as part of your controller dynamically in your code and then evaluate whether or not the user is allowed to access a particular function through bizrule call.

    But the answer in the linked question in the comment is a sensible one and is preferred for more complex role based access management. Since the rules are externally stored you can just call the check function with the controller and its action and bam, you have your true or false.

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

Sidebar

Related Questions

Is there a structured language for declaring styles in a sensible way, which can
Is there any other sensible way where I can fire a touch event on
Is there any sensible way of transforming this: (for ([cos-t (stream-map cos t-range)] [sin-t
I want to represent a 2D shape in such a way that it can
Is there a more sensible way of doing this? I want to make a
Is there a sensible, clean way to refer to application resources from static initalizer
Is there some sensible way to have elements with strongly-typed simple-types and also attributes?
Is there a sensible way to stub/mock the results of a call to IDocumentSession.Query()
Is there a sensible way to group Long UTC dates by Day? I would
There are a lot of blogs saying that a hasOwnProperty check should be used

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.