Documentation Center

Permission Controls

This topic describes the various ways of controlling user access to the Legacy Content Delivery user interface.

Because any user visiting the application needs to be able to see certain parts of the UI (for example, a login page or a 401 Unauthorized page), the UI API does not include permissions checking.

To prevent users from loading HTML templates that they do not have access to (for example, admin_home.html), the tag library provides a permission control attribute. There is no equivalent named template for this attribute, as it is only used in HTML templates. The <lcui:perm> tag can also be used to check if a specific section of a page should be displayed, based on a permission.

The following snippet shows the tag in use:


<!-- An HTML tag, including the lcui namespace.  The lcui:permission attribute prevents this HTML template for being loaded unless the user has this permission. -->
<html xmlns:lcui=http://www.sdlxysoft.com/LiveContent/UITags
     lcui:permission="Manage application">
         <head>
              <title>
		 </head>
		 <body>
			<lcui:perm key="Manage application">
				<div>Content for application managers</div>
			</lcui:perm>
			...
TagDescriptionParameters

Permission Control

@lcui:permission

Place the lcui:permission attribute on the top level of your HTML template (the <html> tag in the case of Main Pages). When loading this HTML template, the application will always check to make sure that the user has this permission. For example, lcui:permission="Use application"

Permission Tests

<lcui:perm/> or <xsl:call-template name="lcui:perm"/>

Unlike most other tags in the tag library, named perm tag is meant to have content within it. If you wanted to place a link on the page only if a user has certain permissions, you should wrap it in <lcui:perm/>.

When using the named template, you should store the value of the template call into a variable. The variable will contain TRUE if the test returned true, or FALSE otherwise.

See the use of <lcui:test> for an example.

  • key -- Name of the permission to test (for example, Use application or Manage pubs).