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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:27:06+00:00 2026-06-13T07:27:06+00:00

I create an admin page by using activeadmin gem http://activeadmin.info/ I use cancan to

  • 0

I create an admin page by using activeadmin gem http://activeadmin.info/
I use cancan to authorize the privilege for 2 kind of user, user manage and book manage user.

My question is: How I hide the resource User when a book manage user log in to admin page?
Active admin

I tried something like that but it didn’t work

 menu false  if can? :manage, BookHeader 

or

 menu false  if authorize! :manage, BookHeader

Thanks for your help!

  • 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-13T07:27:07+00:00Added an answer on June 13, 2026 at 7:27 am

    You have to use proc for build menu dynamicly

    Examples

    dynamic label

    menu :label => proc{current_admin_user.admin? ? "Accounts" : "My Account"}
    

    Display/Hide

     menu :if => proc{ can?(:manage, BookHeader ) }   
    

    For more info about integrating AA and CanCan read this article

    https://github.com/gregbell/active_admin/wiki/How-to-work-with-cancan

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

Sidebar

Related Questions

I have a page which basically allows an admin user to create manager user
I managed to create a simple blog and an admin page using PHP. I
I have a requirement where the CMS admin will create the content [Article] page
I am trying to create a search page, this allows the admin to search
I have created a user from openfire admin page. I have entered the username,
I created a page where I give admin's a way to change photos info
I am using the django admin page to put questions into the database. My
I am trying to create a page in my WordPress Admin Area that displays
I'm using ActiveAdmin, here is my show page: show do |product| attributes_table do row
This question is about WordPress cms. How to create a new admin user with

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.