Bug 858834 - Can't create an organization/env/prod/repo with i18nized names
Summary: Can't create an organization/env/prod/repo with i18nized names
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Katello Bug Bin
QA Contact: Og Maciel
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-19 18:55 UTC by Partha Aji
Modified: 2019-09-26 15:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-12 15:21:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Partha Aji 2012-09-19 18:55:34 UTC
Description of problem:

I18n characters such as ひらがな, 平仮名" are not allowed to be org names in katello. Now that we have the label fields we should relax this case..


Version-Release number of selected component (if applicable):

CFSE 1.0
How reproducible:

always

Steps to Reproduce:
1. $ ./kk -u admin -p admin org create --name="ひらがな, 平仮名"  
--label="japan-org"                                            

Actual results:
Validation failed: Name cannot contain characters other than alpha numerals, space,'_', '-'.

Expected results:
Valid org with that name created.

Additional info:

Comment 1 Partha Aji 2012-09-19 18:56:28 UTC
Proposed solution .. 

--- a/src/app/models/katello_name_format_validator.rb
+++ b/src/app/models/katello_name_format_validator.rb
@@ -13,7 +13,6 @@
 class KatelloNameFormatValidator < ActiveModel::EachValidator
   def validate_each(record, attribute, value)
     if value
-      record.errors[attribute] << N_("cannot contain characters other than alpha numerals, space,'_', '-'.") unless value =~ /\A[\w| |_|-]
       NoTrailingSpaceValidator.validate_trailing_space(record, attribute, value)
       KatelloNameFormatValidator.validate_length(record, attribute, value)
     else

Comment 3 Og Maciel 2012-10-03 01:56:21 UTC
Verified using:

* candlepin-0.7.8-1.el6cf.noarch
* candlepin-selinux-0.7.8-1.el6cf.noarch
* candlepin-tomcat6-0.7.8-1.el6cf.noarch
* katello-1.1.12-12.el6cf.noarch
* katello-all-1.1.12-12.el6cf.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.1.8-1.el6cf.noarch
* katello-cli-1.1.8-6.el6cf.noarch
* katello-cli-common-1.1.8-6.el6cf.noarch
* katello-common-1.1.12-12.el6cf.noarch
* katello-configure-1.1.9-6.el6cf.noarch
* katello-glue-candlepin-1.1.12-12.el6cf.noarch
* katello-glue-pulp-1.1.12-12.el6cf.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.1.1-1.el6cf.noarch
* pulp-1.1.12-1.el6cf.noarch
* pulp-common-1.1.12-1.el6cf.noarch
* pulp-selinux-server-1.1.12-1.el6cf.noarch

Comment 4 James Laska 2012-12-12 15:21:27 UTC
CloudForms-1.1 shipped with katello-1.1.12-22.el6cf, candlepin-0.7.8.1-1.el6cf  and pulp-1.1.14-1.el6cf

Marking this bug CLOSED CURRENTRELEASE.  Please reopen if the problem has not   been addressed in the 1.1 product.


Note You need to log in before you can comment on or make changes to this bug.