move authorize so that it will only be executed once

pull/41/head
Romano Licker 12 years ago committed by Jens Ulferts
parent 5cf8ac7fbc
commit 1df2628cc0
  1. 3
      app/views/projects/settings/_members.rhtml

@ -5,6 +5,7 @@
<div class="splitcontentleft">
<% if members.any? %>
<% authorized = authorize_for('members', 'edit') %>
<table class="list members">
<thead><tr>
<th><%= l(:label_user) %> / <%= l(:label_group) %></th>
@ -19,7 +20,7 @@
<td class="<%= member.principal.class.name.downcase %> <%= user_status_class member.principal%>" title="<%= user_status_i18n member.principal%>"><%= link_to_user member.principal %></td>
<td class="roles">
<span id="member-<%= member.id %>-roles"><%=h member.roles.sort.collect(&:to_s).join(', ') %></span>
<% if authorize_for('members', 'edit') %>
<% if authorized %>
<% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member},
:method => :post,
:html => { :id => "member-#{member.id}-roles-form", :class => 'hol' }) do |f| %>

Loading…
Cancel
Save