站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss Portal 2.2 User Guide 英文版用户使用指南文档

Chapter 8. User and Role Administration - JBoss Portal 2.2 User Guide 英文版用户使用指南文档

Chapter 8. User and Role Administration

Thomas Heute

Roy Russo

8.1. User Portlet

1. Introduction

The user portlet is dedicated to create and manage users and their profiles. This portlet is accessible immediately on the default portal homepage. Also, once logged in, you will notice how it changes to allow the user and administrative functions.

2. Functionalities

Managing users using the user module consists in:

  1. Allowing a user to register a new profile with a login and password
  2. Allowing a user to log in the sytem and be recognized as member of user groups
  3. Allowing a user to update a profile with more information like his real name, instant messenger informations...
  4. Allowing an administrator to see the list of users, from there he can assign roles to a user
  5. Allowing as administrator to assign roles to a user
  6. Allowing a user to logout

3. Configuration

The following xml block is the standard configuration for the UserPortlet found in portal-core.war/WEB-INF/portlet.xml :

   <portlet>
            <portlet-name>UserPortlet</portlet-name>
            <portlet-class>org.jboss.portal.core.portlet.user.UserPortlet</portlet-class>
            <supported-locale>en</supported-locale>
            <supported-locale>fr</supported-locale>
            <resource-bundle>Resource</resource-bundle>
            <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>VIEW</portlet-mode>
            </supports>
            <portlet-info>
            <title>User portlet</title>
            </portlet-info>
            <init-param>
            <description>Whether we should use ssl on login and throughout the Portal. 1=yes;0=no</description>
            <name>useSSL</name>
            <value>0</value>
            </init-param>
            <init-param>
            <description>Subscription mode</description>
            <name>subscriptionMode</name>
            <!--         <value>emailVerification</value>-->
            <value>automatic</value>
            </init-param>
            <init-param>
            <description>Domain of your website for email verification.</description>
            <name>emailDomain</name>
            <value>JBoss.com</value>
            </init-param>
            <init-param>
            <description>Email displayed in the TO field</description>
            <name>emailFrom</name>
            <value>jbossportal@example.com</value>
            </init-param>
            <init-param>
            <description>Default role of registered users</description>
            <name>defaultRole</name>
            <value>Users</value>
            </init-param>
            </portlet>

The following attributes can be modified in the xml descriptor:

  1. useSSL

    Allows for user logins to be passed thru a SSL.

    1. 0

      Set to zero to disable.

    2. 1

      Set to 1 to enable. You must have SSL configured properly in tomcat for this to work.

  2. subscriptionMode
    1. automatic

      The user can register and is automatically enabled

    2. emailVerification

      The user is disabled until he clicks on a link sent to his email address.

  3. emailDomain

    Your domain name or the name of your website for the email verification form text.

  4. emailFrom

    Email address that will appear in the "From" header when the email verification is sent.

  5. defaultRole

    Default role assigned to new users

8.2. Role Portlet

1. Introduction

The role portlet is dedicated to create and edit roles. A role will be used to grant different permission level to different portlets. A user can have several roles (for example he can be an administrator of a category of forum but only a reader on another category)

2. Functionalities

2.1. Create a role

To create a new role, you just need to define a short name that will be used for reference, and a display name for displaying to the user, for example admin would be a good name for the display name Administrators , changing the display name will not affect the security rules

2.2. Edit a role

While editing a role, you just need to pick an exising role then change the display name.

2.3. Editing Role Members

Allows for an administrator to search and modify the members' assigned roles.