search for: link_if_authorized

Displaying 8 results from an estimated 8 matches for "link_if_authorized".

2006 Jan 07
3
user engine question
...ction => ''logout''} ] These are cobbled together in my application_helper.rb as: def construct_horizontal_menu(menu_array) menu_strings = [] menu_array.each do |menu_item| menu_text, throw_away = menu_item.delete(:menu) menu_strings << link_if_authorized(menu_text, menu_item) end menu_strings.delete_if{|x| x.strip == ''''} menu_strings.delete_if {|item| item =~ (user? ? /login/ : /logout/)} menu_strings.join('' | '') end I don''t have a before_filter in application.rb so nothing...
2006 Mar 06
20
How painful is the 1.0 -> 1.1 upgrade going to be?
Does anyone have a sense for how painful the 1.0 -> 1.1 upgrade is going to be for existing apps? I''m finishing up my first real RoR application with Rails 1.0. I can live with it staying at that level, but I really want to use the has_many :through attribute to clean up some of my code. I''m not particularly interested in edge Rails, mainly because the documentation for
2006 Jun 22
4
Authorization Plugin 1.0 release candidate + 3 test apps
In honor of RailsConf, I''m releasing an authorization plugin with 3 test apps that show you how to use the system. A reasonably lengthy description can be found here: http://www.writertopia.com/developers/authorization I will also be talking about the plugin''s architecture in my RailsConf talk on Saturday. Some features: - Nice English-like way of expressing permissions through
2005 Dec 22
2
ACL Navigation Links
I''m currently using the ACL (Access Control Lists) system in my app. The access control is working great, but I''d like to use the permissions/roles setup in the database to hide links to areas a user may not have access for automatically. I''m guessing that you could setup a helper function to use instead of link_to and have it check the permissions, but
2006 Aug 10
2
Authentication: UserEngine or own creation?
Hi all I''m coding a project that needs a lot of authentication stuff... e.g. I write sort of a profile area, where users can create their different profiles. So I need to check if a user has the right to browse the profiles, if he has the right to change them all (as an admin) or the ones that belong to him etc. etc. This needs quite some logic... Now I wonder whether to use the
2006 May 29
3
Hiding HTML Markup
Hi, THis may be a simple question. I am trying to hide some HTML markup language depending on a value. So for example I have the following in an RHTML file: <%if session[:role]=="Administrator" %> <label><Strong>Administration</strong></label><br> <%= link_to("Users", :controller=>"Users",:action=>"list")
2006 Jun 07
6
Links on the left hand side - are components necessary?
Hello, Maybe this is super-trivial... I need to have a list of links on the left hand side of my application, for *every* single page. So, I''ve created a layout called "main" (main.rhtml) under view/layouts, and included >layout "main"< in pretty all of my controllers. main.rhtml has, amongst all the other HTML stuff: <%= render_component
2006 May 24
22
Components going out of style?
I see in the new Agile Rails 2nd edition that components are going out of style? Is this so? has anybody abandoned the idea of components for helpers? Specifically I''m considering a menu sytem for a website that depends heavily on the users permissions to decide which menu options a user would need to see. I thought that components, since they have the logic in the controller and