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 168001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:22:32+00:00 2026-05-11T12:22:32+00:00

I have a standard user/role setup which returns the current user’s roles in a

  • 0

I have a standard user/role setup which returns the current user’s roles in a list. I then use the permissions=” attribute and the preFuseaction phase to check whether this user is authorised to access this fuseaction. This allows some blocks of a page to be displayed and some supressed for different users.

I cannot do the same thing at a more granular level, i.e. to supress the display of links in a sidebar to users who don’t have permission. Say:

<ul>    <li><a href='#xfa.mainmenu#>Main Menu</a></li>    <li><a href='#xfa.adminmenu#>Admin Menu</a></li> </ul> 

The admin menu should only be available to those users with the ‘admin’ role. If a normal user clicks on this link, they don’t get anywhere, because when the fuseaction is actually run, it kicks them out. I would rather that the link wasn’t there in the first place.

This can be done by hardcoding the roles into the .cfm files, so:

<ul>    <li><a href='#xfa.mainmenu#>Main Menu</a></li>    <cfif checkRole('admin') EQ TRUE><li><a href='#xfa.adminmenu#>Admin Menu</a></li></cfif> </ul> 

but it would be a little more elegant if the permissions defined in circuit.xml could be looked up instead and passed to checkRole() (possibly by passing the xfa?) instead of a static value. Is this possible with the structures Fusebox creates?

  • 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. 2026-05-11T12:22:33+00:00Added an answer on May 11, 2026 at 12:22 pm

    Don’t compare to true – it’s an unnecessary waste of time…

    <cfif checkRole('admin') >...</cfif> 

    However, in the display file I would do simply this:

    <cfif StructKeyExists( Xfa , 'AdminMenu' )>     <li><a href='#xfa.adminmenu#>Admin Menu</a></li> </cfif> 

    Then, within your circuit.xml file, you can possibly do:

    <fuseaction name='Menu'>     <do action='NormalMenuLinks'/>     <do action='AdminMenuLinks'/>      ...  </fuseaction>  <fuseaction name='NormalMenuLinks'>     <xfa name='MainMenu' value='...'/>  </fuseaction>  <fuseaction name='AdminMenuLinks' permissions='admin'>     <xfa name='AdminMenu' value='...'/>  </fuseaction> 

    I haven’t actually used FB permissions, so I don’t know if the above would work as intended.

    If it doesn’t, you can do:

    <fuseaction name='Menu'>     <do action='NormalMenuLinks'/>      <if condition='checkRole('admin')'>     <true>         <do action='AdminMenuLinks'/>     </true>     </if>      ...  </fuseaction> 

    Which is a bit ugly, but should work.

    Of course, if you only have a single XFA, you can just use that directly rather than doing the separate fuseactions, but if you have multiple XFAs (especially if they’ll be used in multiple pages) then having the XFAs in fuseactions can help keep things tidy.

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

Sidebar

Ask A Question

Stats

  • Questions 98k
  • Answers 98k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Vista uses Files System Virtualisation to protect some folders. So… May 11, 2026 at 7:39 pm
  • Editorial Team
    Editorial Team added an answer Contact facebook and state your problem, they might relax the… May 11, 2026 at 7:39 pm
  • Editorial Team
    Editorial Team added an answer There are about 3 different frameworks, PhoneGap, QuickConnect, and Rhomobile.… May 11, 2026 at 7:39 pm

Related Questions

I have a standard user/role setup which returns the current user's roles in a
Hopefully someone can shed a little light on an issue that I'm currently having
I'm currently working on creating electronic version of various request forms. Each form will
I have a VB6 application that needs to be installed on Windows Vista as
Outline OK, I have Google'd this and already expecting a big fat NO!! But

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.