summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-06-23 19:48:50 -0500
committerAdam Young <ayoung@redhat.com>2011-06-27 12:11:22 -0400
commit8d9575605dea3ca480f657c1ef3f94cab0d312f8 (patch)
treeeb0836a9502e1304a907e7dd499f75738bc9165f /ipalib/plugins
parentd49bf3871bd4471d73ac06b871ae509bc340a544 (diff)
downloadfreeipa-8d9575605dea3ca480f657c1ef3f94cab0d312f8.tar.gz
freeipa-8d9575605dea3ca480f657c1ef3f94cab0d312f8.tar.xz
freeipa-8d9575605dea3ca480f657c1ef3f94cab0d312f8.zip
Added singular entity labels.
A new attribute label_singular has been added to all entities which contains the singular form of the entity label in lower cases except for acronyms (e.g. HBAC) or proper nouns (e.g. Kerberos). In the Web UI, this label can be capitalized using CSS text-transform. The existing 'label' attribute is intentionally left unchanged due to inconsistencies in the current values. It contains mostly the plural form of capitalized entity label, but some are singular. Also, it seems currently there is no comparable capitalization method on the server-side. So more work is needed before the label can be changed. Ticket #1249
Diffstat (limited to 'ipalib/plugins')
-rw-r--r--ipalib/plugins/automount.py4
-rw-r--r--ipalib/plugins/baseldap.py3
-rw-r--r--ipalib/plugins/config.py1
-rw-r--r--ipalib/plugins/delegation.py3
-rw-r--r--ipalib/plugins/dns.py2
-rw-r--r--ipalib/plugins/entitle.py1
-rw-r--r--ipalib/plugins/group.py1
-rw-r--r--ipalib/plugins/hbacrule.py1
-rw-r--r--ipalib/plugins/hbacsvc.py1
-rw-r--r--ipalib/plugins/hbacsvcgroup.py1
-rw-r--r--ipalib/plugins/host.py1
-rw-r--r--ipalib/plugins/hostgroup.py1
-rw-r--r--ipalib/plugins/krbtpolicy.py1
-rw-r--r--ipalib/plugins/netgroup.py1
-rw-r--r--ipalib/plugins/permission.py1
-rw-r--r--ipalib/plugins/privilege.py1
-rw-r--r--ipalib/plugins/pwpolicy.py1
-rw-r--r--ipalib/plugins/role.py1
-rw-r--r--ipalib/plugins/selfservice.py3
-rw-r--r--ipalib/plugins/service.py1
-rw-r--r--ipalib/plugins/sudocmd.py1
-rw-r--r--ipalib/plugins/sudocmdgroup.py1
-rw-r--r--ipalib/plugins/sudorule.py1
-rw-r--r--ipalib/plugins/user.py1
24 files changed, 30 insertions, 4 deletions
diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py
index 11cea5c90..5f8102d92 100644
--- a/ipalib/plugins/automount.py
+++ b/ipalib/plugins/automount.py
@@ -188,7 +188,7 @@ class automountlocation(LDAPObject):
object_class = ['nscontainer']
default_attributes = ['cn']
label = _('Automount Locations')
-
+ label_singular = _('automount location')
takes_params = (
Str('cn',
@@ -513,6 +513,7 @@ class automountmap(LDAPObject):
)
label = _('Automount Maps')
+ label_singular = _('automount map')
api.register(automountmap)
@@ -604,6 +605,7 @@ class automountkey(LDAPObject):
num_parents = 2
label = _('Automount Keys')
+ label_singular = _('automount key')
already_exists_msg = _('The key,info pair must be unique. A key named %(key)s with info %(info)s already exists')
key_already_exists_msg = _('key named %(key)s already exists')
object_not_found_msg = _('The automount key %(key)s with info %(info)s does not exist')
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 95e628cd0..2e9991317 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -280,6 +280,7 @@ class LDAPObject(Object):
),
}
label = _('Entry')
+ label_singular = _('entry')
container_not_found_msg = _('container entry (%(container)s) not found')
parent_not_found_msg = _('%(parent)s: %(oname)s not found')
@@ -376,7 +377,7 @@ class LDAPObject(Object):
# list of attributes we want exported to JSON
json_friendly_attributes = (
'parent_object', 'container_dn', 'object_name', 'object_name_plural',
- 'object_class', 'object_class_config', 'default_attributes', 'label',
+ 'object_class', 'object_class_config', 'default_attributes', 'label', 'label_singular',
'hidden_attributes', 'uuid_attribute', 'attribute_members', 'name',
'takes_params', 'rdn_attribute', 'bindable', 'relationships',
)
diff --git a/ipalib/plugins/config.py b/ipalib/plugins/config.py
index 9d55f95e3..5e5baad84 100644
--- a/ipalib/plugins/config.py
+++ b/ipalib/plugins/config.py
@@ -89,6 +89,7 @@ class config(LDAPObject):
]
label = _('Configuration')
+ label_singular = _('configuration')
takes_params = (
Int('ipamaxusernamelength?',
diff --git a/ipalib/plugins/delegation.py b/ipalib/plugins/delegation.py
index c3b5e4825..07f602be7 100644
--- a/ipalib/plugins/delegation.py
+++ b/ipalib/plugins/delegation.py
@@ -100,6 +100,7 @@ class delegation(Object):
object_name = 'delegation',
object_name_plural = 'delegation',
label = _('Delegation')
+ label_singular = _('delegation')
takes_params = (
Str('aciname',
@@ -134,7 +135,7 @@ class delegation(Object):
def __json__(self):
json_friendly_attributes = (
- 'label', 'takes_params', 'bindable', 'name',
+ 'label', 'label_singular', 'takes_params', 'bindable', 'name',
'object_name', 'object_name_plural',
)
json_dict = dict(
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index cc2e6e548..d5cffe46d 100644
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -283,6 +283,7 @@ class dnszone(LDAPObject):
'idnssoaminimum'
] + _record_attributes
label = _('DNS')
+ label_singular = _('DNS zone')
takes_params = (
Str('idnsname',
@@ -521,6 +522,7 @@ class dnsrecord(LDAPObject):
default_attributes = _record_attributes + ['idnsname']
label = _('DNS resource record')
+ label_singular = _('DNS resource record')
takes_params = (
Str('idnsname',
diff --git a/ipalib/plugins/entitle.py b/ipalib/plugins/entitle.py
index ab7dd456f..95aff39ee 100644
--- a/ipalib/plugins/entitle.py
+++ b/ipalib/plugins/entitle.py
@@ -187,6 +187,7 @@ class entitle(LDAPObject):
uuid_attribute = 'ipaentitlementid'
label = _('Entitlements')
+ label_singular = _('entitlement')
"""
def get_dn(self, *keys, **kwargs):
diff --git a/ipalib/plugins/group.py b/ipalib/plugins/group.py
index 163a6f5da..e44ad7f24 100644
--- a/ipalib/plugins/group.py
+++ b/ipalib/plugins/group.py
@@ -98,6 +98,7 @@ class group(LDAPObject):
rdnattr = 'cn'
label = _('User Groups')
+ label_singular = _('user group')
takes_params = (
Str('cn',
diff --git a/ipalib/plugins/hbacrule.py b/ipalib/plugins/hbacrule.py
index e282fa219..531d2d90f 100644
--- a/ipalib/plugins/hbacrule.py
+++ b/ipalib/plugins/hbacrule.py
@@ -124,6 +124,7 @@ class hbacrule(LDAPObject):
}
label = _('HBAC Rule')
+ label_singular = _('HBAC rule')
takes_params = (
Str('cn',
diff --git a/ipalib/plugins/hbacsvc.py b/ipalib/plugins/hbacsvc.py
index 3fe9f0fb3..df877a605 100644
--- a/ipalib/plugins/hbacsvc.py
+++ b/ipalib/plugins/hbacsvc.py
@@ -59,6 +59,7 @@ class hbacsvc(LDAPObject):
uuid_attribute = 'ipauniqueid'
label = _('HBAC Services')
+ label_singular = _('HBAC service')
takes_params = (
Str('cn',
diff --git a/ipalib/plugins/hbacsvcgroup.py b/ipalib/plugins/hbacsvcgroup.py
index f50a6c6ee..1685f9115 100644
--- a/ipalib/plugins/hbacsvcgroup.py
+++ b/ipalib/plugins/hbacsvcgroup.py
@@ -62,6 +62,7 @@ class hbacsvcgroup(LDAPObject):
}
label = _('HBAC service Groups')
+ label_singular = _('HBAC service group')
takes_params = (
Str('cn',
diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py
index 1cd3fc061..eff199b42 100644
--- a/ipalib/plugins/host.py
+++ b/ipalib/plugins/host.py
@@ -244,6 +244,7 @@ class host(LDAPObject):
}
label = _('Hosts')
+ label_singular = _('host')
takes_params = (
Str('fqdn', validate_host,
diff --git a/ipalib/plugins/hostgroup.py b/ipalib/plugins/hostgroup.py
index 4ffc2217e..abf01b4fa 100644
--- a/ipalib/plugins/hostgroup.py
+++ b/ipalib/plugins/hostgroup.py
@@ -71,6 +71,7 @@ class hostgroup(LDAPObject):
}
label = _('Host Groups')
+ label_singular = _('host group')
takes_params = (
Str('cn',
diff --git a/ipalib/plugins/krbtpolicy.py b/ipalib/plugins/krbtpolicy.py
index 4347f4146..0c76256b7 100644
--- a/ipalib/plugins/krbtpolicy.py
+++ b/ipalib/plugins/krbtpolicy.py
@@ -77,6 +77,7 @@ class krbtpolicy(LDAPObject):
limit_object_classes = ['krbticketpolicyaux']
label=_('Kerberos Ticket Policy')
+ label_singular = _('Kerberos ticket policy')
takes_params = (
Str('uid?',
diff --git a/ipalib/plugins/netgroup.py b/ipalib/plugins/netgroup.py
index 7c2fc55e2..56e026ed2 100644
--- a/ipalib/plugins/netgroup.py
+++ b/ipalib/plugins/netgroup.py
@@ -96,6 +96,7 @@ class netgroup(LDAPObject):
}
label = _('Netgroups')
+ label_singular = _('netgroup')
takes_params = (
Str('cn',
diff --git a/ipalib/plugins/permission.py b/ipalib/plugins/permission.py
index 7988b33c2..63f166c6f 100644
--- a/ipalib/plugins/permission.py
+++ b/ipalib/plugins/permission.py
@@ -105,6 +105,7 @@ class permission(LDAPObject):
rdnattr='cn'
label = _('Permissions')
+ label_singular = _('permission')
takes_params = (
Str('cn',
diff --git a/ipalib/plugins/privilege.py b/ipalib/plugins/privilege.py
index 24398002f..890dcd7cc 100644
--- a/ipalib/plugins/privilege.py
+++ b/ipalib/plugins/privilege.py
@@ -63,6 +63,7 @@ class privilege(LDAPObject):
rdnattr='cn'
label = _('Privileges')
+ label_singular = _('privilege')
takes_params = (
Str('cn',
diff --git a/ipalib/plugins/pwpolicy.py b/ipalib/plugins/pwpolicy.py
index b360cd9dc..fc1f7015f 100644
--- a/ipalib/plugins/pwpolicy.py
+++ b/ipalib/plugins/pwpolicy.py
@@ -217,6 +217,7 @@ class pwpolicy(LDAPObject):
)
label = _('Password Policy')
+ label_singular = _('password policy')
takes_params = (
Str('cn?',
diff --git a/ipalib/plugins/role.py b/ipalib/plugins/role.py
index 5e41bf497..dc6341ac4 100644
--- a/ipalib/plugins/role.py
+++ b/ipalib/plugins/role.py
@@ -79,6 +79,7 @@ class role(LDAPObject):
rdnattr='cn'
label = _('Role')
+ label_singular = _('role')
takes_params = (
Str('cn',
diff --git a/ipalib/plugins/selfservice.py b/ipalib/plugins/selfservice.py
index 666178cb1..8154d2da8 100644
--- a/ipalib/plugins/selfservice.py
+++ b/ipalib/plugins/selfservice.py
@@ -73,6 +73,7 @@ class selfservice(Object):
object_name = 'selfservice',
object_name_plural = 'selfservice',
label = _('Self Service Permissions')
+ label_singular = _('self service permission')
takes_params = (
Str('aciname',
@@ -97,7 +98,7 @@ class selfservice(Object):
def __json__(self):
json_friendly_attributes = (
- 'label', 'takes_params', 'bindable', 'name',
+ 'label', 'label_singular', 'takes_params', 'bindable', 'name',
'object_name', 'object_name_plural',
)
json_dict = dict(
diff --git a/ipalib/plugins/service.py b/ipalib/plugins/service.py
index 14e04d26b..4f8bc1eb8 100644
--- a/ipalib/plugins/service.py
+++ b/ipalib/plugins/service.py
@@ -218,6 +218,7 @@ class service(LDAPObject):
}
label = _('Services')
+ label_singular = _('service')
takes_params = (
Str('krbprincipalname', validate_principal,
diff --git a/ipalib/plugins/sudocmd.py b/ipalib/plugins/sudocmd.py
index f8c4a8e79..a3f3beb0d 100644
--- a/ipalib/plugins/sudocmd.py
+++ b/ipalib/plugins/sudocmd.py
@@ -62,6 +62,7 @@ class sudocmd(LDAPObject):
}
uuid_attribute = 'ipauniqueid'
label = _('Sudo Commands')
+ label_singular = _('sudo command')
takes_params = (
Str('sudocmd',
diff --git a/ipalib/plugins/sudocmdgroup.py b/ipalib/plugins/sudocmdgroup.py
index 3931111fc..49b172ea2 100644
--- a/ipalib/plugins/sudocmdgroup.py
+++ b/ipalib/plugins/sudocmdgroup.py
@@ -63,6 +63,7 @@ class sudocmdgroup(LDAPObject):
}
label = _('Sudo Command Groups')
+ label_singular = _('sudo command group')
takes_params = (
Str('cn',
diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py
index bd20532e4..1f0775783 100644
--- a/ipalib/plugins/sudorule.py
+++ b/ipalib/plugins/sudorule.py
@@ -66,6 +66,7 @@ class sudorule(LDAPObject):
}
label = _('Sudo Rule')
+ label_singular = _('sudo rule')
takes_params = (
Str('cn',
diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py
index de1aa33f3..1f85238da 100644
--- a/ipalib/plugins/user.py
+++ b/ipalib/plugins/user.py
@@ -106,6 +106,7 @@ class user(LDAPObject):
rdnattr = 'uid'
bindable = True
+ label_singular = _('user')
label = _('Users')
takes_params = (