diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-08-29 16:52:35 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-08-29 16:52:35 +0000 |
commit | 603e11d7a5aa62f923e7b013cac6c66462131232 (patch) | |
tree | fbbb204d2b92b5a87b787d56fe3f9c62cc3f259b /app/views/queries | |
parent | 8da5bad29516be6cbe1bc52e78837ac1ec292026 (diff) | |
download | redmine-603e11d7a5aa62f923e7b013cac6c66462131232.tar.gz redmine-603e11d7a5aa62f923e7b013cac6c66462131232.zip |
Merged 0.6 branch into trunk.
Permissions management was rewritten. Some permissions can now be specifically defined for non member and anonymous users.
This migration:
* is irreversible (please, don't forget to *backup* your database before upgrading)
* resets role's permissions (go to "Admin -> Roles & Permissions" to set them after upgrading)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@674 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/queries')
-rw-r--r-- | app/views/queries/_form.rhtml | 2 | ||||
-rw-r--r-- | app/views/queries/index.rhtml | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/app/views/queries/_form.rhtml b/app/views/queries/_form.rhtml index 9482bd33a..d641fa0b5 100644 --- a/app/views/queries/_form.rhtml +++ b/app/views/queries/_form.rhtml @@ -5,7 +5,7 @@ <p><label for="query_name"><%=l(:field_name)%></label> <%= text_field 'query', 'name', :size => 80 %></p> -<% if authorize_for('projects', 'add_query') %> +<% if current_role.allowed_to?(:manage_pulic_queries) %> <p><label for="query_is_public"><%=l(:field_is_public)%></label> <%= check_box 'query', 'is_public' %></p> <% end %> diff --git a/app/views/queries/index.rhtml b/app/views/queries/index.rhtml index 69cfb8f98..71aa37497 100644 --- a/app/views/queries/index.rhtml +++ b/app/views/queries/index.rhtml @@ -1,7 +1,5 @@ <div class="contextual"> -<% if loggedin? %> -<%= link_to l(:label_query_new), {:controller => 'queries', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %> -<% end %> +<%= link_to_if_authorized l(:label_query_new), {:controller => 'queries', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %> </div> <h2><%= l(:label_query_plural) %></h2> @@ -17,7 +15,7 @@ </td> <td align="right"> <small> - <% if query.editable_by?(@logged_in_user) %> + <% if query.editable_by?(User.current) %> <%= link_to l(:button_edit), {:controller => 'queries', :action => 'edit', :id => query}, :class => 'icon icon-edit' %> <%= link_to l(:button_delete), {:controller => 'queries', :action => 'destroy', :id => query}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> </small> |