Mar 8, 2018 11:50:35 AM seb leridon avatar   697

Create new administration features

The administration features correspond to the set functions available in the module administrator whatever his level of access: administrator technical, webmaster or local speaker.

For each feature corresponds a right that can be assigned to a user. This right is leveled to distinguish the different user profiles. Levels values rights are as follows:

  • 0 - Technical Administrator
  • 1 - Content Producer
  • 2 - Webmaster
  • 3 - Local speaker

When the user is authorized, the functionality appears in its home menu as a title and a description. By clicking on the link, the user access the JSP which is the entry point of the functionality.

This JSP usually has a name of type Manage <MyFeature> .jsp. The code of the JSP must verify that the current user is authorized, and if so, it will call the method of JspBean associated with functionality (typically MyFeatureJspBean) rendering the homepage of it.

<% @ include file = .. / PluginAdminHeader.jsp%>

<jsp: useBean = myFeature scope = session class = />
<jsp: useBean id = user scope = session class = />

if (user.check (MYFEATURE_MANAGEMENT))
     <% = myFeature.getManageMyFeature (request)%>
     response.sendRedirect (user.getPluginAccessDeniedUrl ());
<% @ include file = .. / .. / AdminFooter.jsp%>

NB: The JSP of the functionality receives in parameter of the HTTP request the name of the plugin with which it is associated (plugin_name parameter). This allows two plugins to share the same features in contexts different.

Definition of an administration feature in the plugin configuration file

To install a new feature in Lutetia, it must be packaged in a plugin. [HOWTO - Plugins]

The definition of the feature in the file plugin configuration is done by adding lines following:

     <feature-title>My Feature</feature-title>
     <feature-description>Description of my feature</feature-description>