問題
- MS Active Directory から作成された Liferay でカスタム属性をマップする方法はありますか?
Environment
- Liferay ポータル 6.2
解決策
-
Liferay は、カスタム属性マッピングを実現するための OOTB オプションを提供します。
#
# When importing and exporting users, the portal will use this mapping to
# connect LDAP user attributes and portal user's custom attributes.
#
#ldap.user.custom.mappings.0=MS Active Directory 側:
- 「管理者として実行」でCMDを開きます。
- regsvr32 schmmgmt.dll と入力して Enter キーを押します
- Startをクリックし、 Runをクリックし、 mmcと入力して OKクリックします。
- ファイル メニューで、 スナップインの追加と削除をクリックします。
- 利用可能なスナップインで、 Active Directory スキーマをクリックし、 追加をクリックしてから、 OKをクリックします。
- Attributesをクリックし、 Common Name (ex. testcustom), と入力します。構文で「Unicode String」を選択し、Unique X500 object ID で 1.2.840.113 と入力します。 [OK] をクリックします
- Classes をクリックし、User> Attribute> Add を選択します。
- カスタム属性を選択して [OK] をクリックし、[適用] をクリックしてから [OK] をクリックします。
- Start> Services をクリックし、「Apache Directory domain services」を再起動します。
- ここで、カスタム属性タブが見つからない場合は、 スタート> 管理ツール> Active Directory ユーザーとコンピューター をクリックし、上部から表示をクリックして 詳細機能を選択します。 これで、ユーザー プロパティにカスタム属性が表示されます。>属性エディター。
- カスタム属性をクリックして値を指定します
Liferay 側:
- カスタムフィールドの作成 (コントロールパネル>カスタムフィールド> カスタムフィールドの追加) ex. Akash_custom
- UI-> から カスタム ユーザー マッピング フィールド タイプの下 カスタム フィールド キー= カスタム属性 (例: akash_custom=testcustom) portal-ext.properties- から> set ldap.user.custom.mappings.0=akash_custom=テストカスタム