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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:50:30+00:00 2026-05-29T09:50:30+00:00

When a user in my app isn’t an admin user i want to only

  • 0

When a user in my app isn’t an admin user i want to only let them see the fields that they have ownership of.

Is there a so set can :see or something like that on a per field basis so that it displays just the fields that that use “can see”, or should I have an ability called can :oversee to state that they can see everything instead.

I suppose it’s much easier to just check if the user is admin or not in rails admin, so where set rails admin to only pull the current user’s records.

  • 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-29T09:50:31+00:00Added an answer on May 29, 2026 at 9:50 am

    With cancan, you can check permissions on objects like this:

    if can?(:read, order)
      # do something!
    end
    
    if can?(:email, order)
      # do something!
    end
    

    But that’s only referring to visibility at the object level.

    In RailsAdmin, you can set field visibility by passing in a blocks, described here.

    For example:

    RailsAdmin.config do |config|
      config.model Order do
        list do
          field :name
          field :profit do
            visible do
              current_user.roles.include?(:admin)
            end
          end
        end
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a multi-user ASP.NET app running against SQL Server and want to have
I have a java app that uses log4j. Config: log4j.rootLogger=info, file log4j.appender.file=org.apache.log4j.DailyRollingFileAppender log4j.appender.file.File=${user.home}/logs/app.log log4j.appender.file.layout=org.apache.log4j.PatternLayout
I have a Rails app that is storing some user information in a cookie,
I'm writing an user-driven app with several zones to it. I want to allow
I'm developing web app that user can save his/her work to server. The data
My web app (asp VB 2005) uses Windows authentication. If the user isn't part
Using the Settings.app on the iPhone isn't that hard. In fact Xcode does the
I have a Rails app that sets a cookie and does a redirect to
In a Java project (SWT desktop app), I want to inform the user about
I have a C#.NET 4.0 app that uses log4net for logging. Under Windows XP,

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.