-# redMine - project management software
-# Copyright (C) 2006 Jean-Philippe Lang
+# Redmine - project management software
+# Copyright (C) 2006-2011 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
name
end
+ def name
+ case builtin
+ when 1; l(:label_role_non_member, :default => read_attribute(:name))
+ when 2; l(:label_role_anonymous, :default => read_attribute(:name))
+ else; read_attribute(:name)
+ end
+ end
+
# Return true if the role is a builtin role
def builtin?
self.builtin != 0
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_role_plural: Roles
label_role_new: New role
label_role_and_permissions: Roles and permissions
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_member: Member
label_member_new: New member
label_member_plural: Members
label_role_plural: Roles
label_role_new: New role
label_role_and_permissions: Roles and permissions
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_member: Member
label_member_new: New member
label_member_plural: Members
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author\r
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous\r
+ label_role_non_member: Non member\r
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_role_plural: Rôles
label_role_new: Nouveau rôle
label_role_and_permissions: Rôles et permissions
+ label_role_anonymous: Anonyme
+ label_role_non_member: Non membre
label_member: Membre
label_member_new: Nouveau membre
label_member_plural: Membres
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author\r
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous\r
+ label_role_non_member: Non member\r
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author\r
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous\r
+ label_role_non_member: Non member\r
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author\r
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous\r
+ label_role_non_member: Non member\r
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author\r
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous\r
+ label_role_non_member: Non member\r
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
label_bulk_edit_selected_time_entries: Bulk edit selected time entries
text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)?
+ label_role_anonymous: Anonymous
+ label_role_non_member: Non member
-# redMine - project management software
-# Copyright (C) 2006-2008 Jean-Philippe Lang
+# Redmine - project management software
+# Copyright (C) 2006-2011 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
assert ! role.permissions.include?(perm[0])
assert_equal size - 2, role.permissions.size
end
+
+ def test_name
+ I18n.locale = 'fr'
+ assert_equal 'Manager', Role.find(1).name
+ assert_equal 'Anonyme', Role.anonymous.name
+ assert_equal 'Non membre', Role.non_member.name
+ end
context "#anonymous" do
should "return the anonymous role" do