Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Roles for the logged in user are stored as part of the UserDetails stored in the Reference Framework’s Security Manager. These roles are filled in by the Reference Framework SecurityService during login. For more details see Reference Framework Security configuration.

...

Attribute
•    role - specifies the role(s) for which the home page is to be used.

Notes
If no role is specified the homepage is used for the logged in user.
If more than one home page is configured with the same role (or no role), then the first home page matching role will be used.
Exampleログイン中のユーザーのロールは Reference Framework のセキュリティマネージャ に UserDetails として保存されます。これらのロールはログイン中、Reference Framework セキュリティサービスにより記録されます。詳細な情報は、Reference Framework セキュリティ設定をご覧ください。

 

ホームページ
Reference Framework ホームページ設定はログイン中のユーザーに基づきロードされるホームページ以上の設定を可能にします。

属性
• role - どのロールにより使用されるかを指定します。


ロールが指定されない場合、ホームページがログイン中のユーザーのために使用されます。1つ以上のホームページが同じロール(またはロールなし)で設定されている場合、ロールと合致している最初のホームページが使用されます。

Code Block
<homepageConfig>
     <homepage pageId="homepageAdmin" role="ROLE_ADIM"/>
     <homepage pageId="homepageExec" role="ROLE_EXEC"/>
     <homepage pageId="homepageUser" role="ROLE_USER"/>
 </homepageConfig>

Shortcutsショートカット
The Reference Framework provides ability to configure whether or not a short cut key is available to the logged in user based on their assigned role.Attribute
•    role - specifies the role(s) valid for executing the shortcut
   
Notes
If no role is specified then the shortcut is valid for the logged in user.
ExampleReference Frameworkは、アサインされたロールに基づき、ログイン中のユーザーが、ショートカットキーが利用できるかどうかを設定する機能を提供します。

属性
• role - ショートカットを実行が有効になるロールを指定します。


ロールが指定されない場合、ログイン中のユーザーに対しショートカットが有効になります。 

Code Block
<shortcut key="F5" onCommand="PageManager.loadPage( 'companyOverview' )" role="ROLE_USER"/>
<shortcut key="F6" onCommand="PageManager.loadPage( 'statusReport' )" role="ROLE_ADMIN"/>

Menu Items
The Reference Framework provides a means of controlling the presentation of a menu item through the use of roles.  Menu items can be made to be invisible or disabled based on the role of the logged in user.

Attribute
•    role - specifies the role(s) required to make the menu item visible
•    roleVisible - specifies the role(s) required for the menu item to be visible
•    roleEnabled - specifies the role(s) required for the menu item to be enabled
   
Notes

The role attribute and roleVisible attribute work the same.  The role attribute exists for compatibility.
If no role or roleVisible attribute is set then the menu item will be visible by default.
If the roleEnabled attribute is not set, then the menu item will be enabled by default.

Example Reference Framework はロールの使用によりメニュー項目の表示をコントロールする手段を提供します。メニュー項目は、ログイン中のユーザーのロールに基づき表示しない、または無効にすることができます。

属性
• role - メニュー項目を表示可能にする必要のあるロールを指定します
• roleVisible - 表示可能なメニュー項目に必要なロールを指定します
• roleEnabled - メニュー項目が有効になるために必要なロールを指定します


role 属性と表示可能な role 属性は同じように稼働します。 role 属性は互換性のために存在します。ロールまたは roleVisible 属性が設定されると、メニュー項目がデフォルトで表示可能になります。roleEnnabled 属性が設定されていない場合、メニュー項目がデフォルトで有効になります。

Code Block
<menuGroups>
     <menuGroup name="samplesMenu" text="Nexaweb Samples>
         <item name="samplesMenu.page1" onCommand="page:page2.load()" role="ROLE_ADMIN" text="Page 1"/>
         <item name="samplesMenu.page2" onCommand="page:page2.load()" roleVisible="ROLE_ADMIN" text="Page 2"/>
         <item name="samplesMenu.page3" onCommand="page:page3.load()" roleEnabled="ROLE_USER" text="Page 3"/>
     </menuGroup>
 </menuGroups>

Command Buttons
The Reference Framework provides a means of controlling the presentation of a menu item through the use of roles.  Menu items can be made to be invisible or disabled based on the role of the logged in user.

Attribute
•    role - specifies the role(s) required to make the button visible
•    roleVisible - specifies the role(s) required for the button to be visible
•    roleEnabled - specifies the role(s) required for the button to be enabled

Notes
The role attribute and roleVisible attribute work the same.  The role attribute exists for compatibility.
If no role or roleVisible attribute is set then the button will be visible by default.
If the roleEnabled attribute is not set, then the button will be enabled by default.

Example Reference Framework はロールの使用でメニュー項目の表現をコントロールする手段を提供します。メニュー項目は、ログイン中のユーザーのroleロール基づき、表示できないまたは無効にすることが可能です。

属性
• role - ボタンが表示可能にするために必要なロールを指定する
• roleVisible - ボタンが表示可能にするために必要なロールを指定します。
• roleEnabled - ボタンが有効になるために必要なロールを指定します


role 属性と roleVisible 属性は同じ働きをします。role 属性は互換性のために存在します。Roleまたは roleVisible 属性が設定されていない場合、ボタンはデフォルトで表示可能です。roleEnabled 属性が設定されていない場合、ボタンはデフォルトで有効になります。

Code Block
<commandbar>
    <button image="/images/button1.png" name="cmdButton1" onCommand="mco:cmdMco.handleButton1()" tooltip="First Button"
            role="ROLE_ADMIN"/>
    <button image="/images/button2.png" name="cmdButton2" onCommand="mco:cmdMco.handleButton2()" tooltip="Second Button"
            roleVisible="ROLE_ADMIN"/>
    <button image="/images/button3.png" name="cmdButton3" onCommand="mco:cmdMco.handleButton3()" tooltip="Third Button"
            roleEnabled="ROLE_USER"/>
</commandbar>

Pages
The Reference Framework provides control over loading a page, or whether it can be edited through the use of roles.
 
Attribute
•    roleOpen - specifies the role(s) valid for opening the page
•    roleReadOnly - specifies the role(s) that will open the page as read-only
   
Notes
If the roleOpen attribute is not set, then the logged in user will be allowed to open the page.
If the roleReadOnly attribute is not set, then the page will be open as editable. 
 Example
     はページをロード、またはロールの使用で編集することができるかどうかに関するコントロールを提供します。

属性
• roleOpen - ページを開くために有効なロールを指定します
• roleReadOnly - リードオンリーとしてページを開くロールを指定します


roleOpen 属性が設定されていない場合、ログイン中のユーザーはページを開くことができます。roleReadOnly 属性が設定されていない場合、ページは編集可能として開きます。

Code Block
<page name="page1" title="Page 1" xal="/XAL/pages/Page1.xal" roleOpen="ROLE_ADMIN"/>
<page name="page2" title="Page 2" xal="/XAL/pages/Page2.xal" roleReadOnly="ROLE_USER"/>

Components
The Reference Framework provides a means for controlling behavior for individual components through the use of roles.   Roles can be used to control visibility,  whether or not a control is enabled or whether or not a control is read only.

Attribute
•    roleEnabled - specifies the role(s) required to make a component enabled
•    roleVisibile - specifies the role(s) required to make a component visible
•    roleReadOnly - specifies the role(s) required to make a component read onlyle
•    rolePolicy- specifies how the policy is applied.

...

Reference Framework はロールの使用により、各コンポーネントの振る舞いをコントロールする手段を提供します。 ロールは、コントロールが有効かどうか、コントロールがリードオンリーかどうかに関する表示性をコントロールするために使用することができます。

属性
• roleEnabled - コンポーネントを有効にするために必要なロールを指定する
• roleVisibile - コンポーネントを表示可能にするために必要なロールを指定する
• roleReadOnly - コンポーネントをリードオンリーにするために必要なロールを指定する
• rolePolicy- ポリシーがどのように適用されるかを指定する

有効値 : allow|deny

Notes
If the roleEnable attribute is not set, the component will be enabled
If the roleVisible attribute is not set, the component will be visible
If the roleReadOnly attribute is not set, the component will be editable 
ExamplesroleEnable 属性が設定されていない場合、コンポーネントは有効になります
roleVisible 属性が設定されていない場合、コンポーネントは表示可能になります
roleReadOnly 属性が設定されていない場合、コンポーネントは編集可能になります

Code Block
<button height="25px" roleEnabled="ROLE_ADMIN" text="Run Report" width="100px" x="36px" y="205px"/>
<button height="25px" roleVisible="ROLE_ADMIN" text="Run Report" width="100px" x="36px" y="205px"/>
<button height="25px" roleReadOnly="ROLE_ADMIN" text="Run Report" width="100px" x="36px" y="205px"/>
<textField roleReadOnly="ROLE_ADMIN" height="25px" width="200px" x="49px" y="251px"/>

For a button with this settingこの設定でのボタン :

<button text="Push Me" roleVisible="ROLE_DEPT_A" rolePolicy="deny"/>

For user with different roles, the button will be visible/invisible as below table displays異なるロールのユーザーに関しては、次の表が表示しているようにボタンが表示可能/不可になります :

rolePolicy valueの値

allowdeny
user has a role of ROLEユーザーがROLE_DEPT_AAのロールを保有visibleinvisible
user has a role that is not ROLEユーザーはROLE_DEPT_AAでないロールを保有; eg. つまり ROLE_DEPT_Binvisiblevisible

...

Attribute
•    role - specifies the role(s) indicating the page to be loaded as the next or previous page.
   
Notes
If the role attribute is not set then the page will be loaded as the next or previous page as specified in the configuration.
If more than one configuration contains a matching role, including no role set, then the first configuration will be used.

Exampleページナビゲーション
ログイン中のユーザーのロールに基づき、どのページがロード可能にするかによって、ページナビゲーションをコントロールします。

属性
• role - 次または前のページとしてロードされるページを示すロールを指定します


role属性が設定されてない場合、設定で指定されているように次または前のページとしてページがロードされます。1つ以上の設定がrole設定を含まず合致したロールを含んでいる場合、最初の設定が使用されます。

Code Block
<page name="page1" title="Page 1" xal="/XAL/pages/Page1.xal" roleOpen="ROLE_ADMIN">
     <navigation>
          <nextPage pageId="pageA" role="ROLE_ADMIN"/>
          <nextPage pageId="pageB" role="ROLE_USER"/>
          <prevPage pageId="pageC" role="ROLE_ADMIN"/>
          <prevPage pageId="pageD" role="ROLE_USER"/>
     </navigation>
</page>

...