Bug 858834 - Can't create an organization/env/prod/repo with i18nized names
Can't create an organization/env/prod/repo with i18nized names
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: Unspecified
: --
Assigned To: Katello Bug Bin
Og Maciel
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-09-19 14:55 EDT by Partha Aji
Modified: 2013-03-27 16:05 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-12-12 10:21:27 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Partha Aji 2012-09-19 14:55:34 EDT
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:


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

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 14:56:28 EDT
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)
Comment 3 Og Maciel 2012-10-02 21:56:21 EDT
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 10:21:27 EST
CloudForms-1.1 shipped with katello-1.1.12-22.el6cf, candlepin-  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.