app/models/user.rb
def has_permissions_to?(controller, action)
    return true if self.is_admin?

    # only PMs and clients have rss feeds
    return false if controller == "your_data" and action =~ /rss/ and !self.is_admin?

    case controller # those controllers are not allowed by default
      when "your_data", "login", "sparklines"
        true
      else
        false
    end
  end
#
# Checks if the user has permissions to view specified controller and action 
# If user has administrator role, he has all permissions
#

Checks if the user has permissions to view specified controller and action
If user has administrator role, he has all permissions
Checks if the user has permissions to view specified controller and action If user has administrator role he has all permissions
def has_permissions_to?(controller, action)
    return true if self.is_admin?
    return false if controller == "your_data" and action =~ /rss/ and !self.is_admin?
    case controller 
      when "your_data", "login", "sparklines"
        true
      else
        false
    end
  end
def has_permissions_to? ( controller , action ) return true if self . is_admin? return false if controller == "your_data" and action =~ / rss / and ! self . is_admin? case controller when "your_data" , "login" , "sparklines" true else false end end
Checks if the user has permissions to view specified controller and action
If user has administrator role, he has all permissions
Checks if the user has permissions to view specified controller and action If user has administrator role he has all permissions
# only PMs and clients have rss feeds
 # those controllers are not allowed by default

controller
action