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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:53:49+00:00 2026-05-28T17:53:49+00:00

I am using rails 3.2 and devise 1.5.3. I added an admin attribute in

  • 0

I am using rails 3.2 and devise 1.5.3.

I added an admin attribute in my model as described in option 2 on the devise wiki How To: Add an Admin Role

I added this in a post controller for force logins:

before_filter :authenticate_user!

I wrote some logic to hide the edit/new links in my views based on whether you’re an admin or not.

I feel like there’s more I should be doing.. Should I add anything else to new/edit/delete actions to make them more secure? If so, where?

  • 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-28T17:53:50+00:00Added an answer on May 28, 2026 at 5:53 pm

    your answer may be working but it is pretty difficult to ensure security in the whole app if you are using some logic to hide the edit/new links in my views and I’m pretty sure no amount of security testing would give you the feeling that maybe you are forgetting about something

    for example I someone could log in,,,, (not having admin profile) and go to (in the URL),:
    /users/edit/3 and start damaging your valuable information….

    situation is: Devise only provides authentication,,, but authorization has to be enforced in some other way or else I could be able to do the above things…

    for that I would highly recommend CanCan (from rbates ofcourse) which is the one I have tested personally and is PRETTY easy to configure just by reading the docs and examples in github….. hope it helps!

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

Sidebar

Related Questions

I'm using rails 3.1.3 and devise 1.5.3 and when I add destroy_user_session_path to my
I have a rails app that is using Devise, with a User model, no
I am using Devise in Rails 3, and have a User model in rails
I am using Devise for authentication in a Rails 3 app. I added first_name
Using Rails v2.1, lets say you have an action for a controller that is
I am using Rails 3 and Devise to create an app where users arrive
I'm using rails 2.3.5 and devise 1.0.6. I'm having users confirm account's with email.
I'm building a Rails application using Devise. Devise is all set up even omniauth.
I'm using force_ssl (Rails 3.1, specifically in the Devise config) to make sure that
Using Rails 3.1.3 with Devise 1.5.3. My app has accounts and users. Each account

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.