用户 FreeIPA 看不到新的可自定义属性

我在您的中添加了一些新的可自定义属性 FreeIPA, 到目前为止,我使用管理员帐户来检查它们 WebUI. 但今天我可以访问 WebUI, 使用普通用户帐户,惊讶地看到未显示新属性。 当我使用时 "检查元素" 要查看页面代码,我找到了属性代码,如下所示:

<dev class="widget text-widget" name="bloodtype" style="display: none;">...</dev>

请注意,管理员仍然可见该属性。

属性方案:

dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 1.3.6.1.4.1.32473.1.1.591
NAME 'bloodtype'
DESC 'Employee Blood type'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE
X-ORIGIN 'Oracle Unified Directory Server'
USAGE userApplications )

对象类:

objectclasses: ( 2.16.840.1.113730.3.8.61.11 NAME 'customPerson' SUP person STRUCTURAL MAY bloodtype X-ORIGIN ( 'Extending FreeIPA' 'user defined' ) )

插入 python:

from ipalib.plugins import user
from ipalib.parameters import Str
from ipalib import _
def validate(ugettext,value):
if value not in ['A','B','AB','O']:
return _("Blood type must be either A, B, AB or O.")
user.user.takes_params = user.user.takes_params + (
Str('bloodtype?',validate,
cli_name='bloodtype',
label=_('Blood Type'),
),
)
user.user.default_attributes.append('bloodtype')

插入 javascript:

[code]define([
'freeipa/phases',
'freeipa/user'],
function(phases, user_mod) {
// helper function
function get_item(array, attr, value) {
for (var i=0,l=array.length; i<l; $type:'radio',="" '$type',="" 'details');="" 'identity');="" 'name',="" (array[i][attr]="value)" <="" [="" array[i];="" code]="" div="" facet="get_item(user_mod.entity_spec.facets," i++)="" if="" label:'blood="" name:'bloodtype'="" null;="" options:[{label:'a',value:'a'},{label:'b',value:'b'},{label:'ab',value:'ab'},{label:'o',value:'o'}],="" phases.on('customization',="" plugin="{};" plugin.add_fields="function()" plugin.add_fields);="" plugin;="" return="" section="get_item(facet.sections," section.fields.push({="" true;="" type',="" var="" {="" }="" });="" };="" 有什么问题以及如何允许所有用户查看它?="">
<div class="answer_text">
您必须添加一个新属性 ACI.

你可以改变 ACI 在 cn = users, cn = accounts, dn = example, = dn = com 直接地

或者您可以添加新属性 «managed_permissions» 在用户类中,您要提供访问它们的权限。 之后你需要运行 ipa-ldap-updater --upgrade.

或者您可以创建一个新的分辨率 ACI 并将其添加到现有权限。
</div>
</l;>
已邀请:

诸葛浮云

赞同来自:

您必须添加一个新属性 ACI.

你可以改变 ACI 在 cn = users, cn = accounts, dn = example, = dn = com 直接地

或者您可以添加新属性 «managed_permissions» 在用户类中,您要提供访问它们的权限。 之后你需要运行 ipa-ldap-updater --upgrade.

或者您可以创建一个新的分辨率 ACI 并将其添加到现有权限。

要回复问题请先登录注册