Guidelines for Using a Custom Role
The custom permissions role lets your Web developer create a site page, and then restrict access to that page’s content (or areas with a page) to users assigned to a custom role.
Items you could show and hide could be as simple as a content block. But they could be more complicated, such as displaying buttons and fields for one user group, and something completely different for another.
Custom roles have no effect inside the workarea.
Examples of Custom Roles
- Most of your site visitors belong to different political parties, while some are not registered with any party. By checking the user’s ID against custom roles, you could present registered voters with selections for their party’s primary, and prevent unregistered voters from participating.
- Your Ektron site visitors fall into 2 categories: suppliers and buyers. You could check the current user against a custom role and show buyers one set of data and suppliers a different set.
- On your eCommerce site, registered students see a list of coupons that are not displayed for anyone else. Or, only registered adults can order age-controlled items, such as tobacco or alcohol.
- Control your pages’ background colors, images, and skins based on custom roles. For example, mothers get family-oriented background images while teenagers get rock images and related styling.
Setting up a Custom Role
- Set up user groups and add to them users who will have some level of access to the custom page. Creating a New User Group
- To continue the above example, create one group of auditors (who will have read-only access), and another group of administrators (who will have edit access).
- Create a folder to hold the content that will appear on the custom page. Use the folder’s permission table to assign users and groups appropriate access to the folder’s content. Managing Folder Permissions
- Go to Workarea > Settings > Roles > Custom Permissions.
- Click Add Custom Roles. The Manage Custom Roles screen appears.
- Enter a name for the custom role.
- Click Save. The Manage Custom Roles screen appears, displaying the new custom role.
- Click the name of the role you created. The Manage Members for Role screen appears.
- From the Show drop-down menu, select the type of users you want to add to the role.
- Click AddRole Member.
- Check the box next to the users or groups that you want to add to the role.
- Click Save. The Manage Members for Role screen appears.
- Your Web developer creates the custom page.
- You create content to appear on the custom page. Place the content in the folder you created in Step 2.
Information about Custom Roles for your Developer
The API provides 2 methods that determine if the current user is logged in, and if he is a member of the Administrators group. The methods let you test customizable roles with conditions outside the standard Is-Logged-In / Is-Admin tests.
API methods are listed below.
GetRolePermissionSystem(RoleName
As String, nUserId As Long)
|
a Boolean value indicating if the user belongs to the system-wide custom role
|
GetRolePermissionFolder(RoleName
As String, nFolderId As Long, nUserId As Long)
|
a Boolean value indicating if the user belongs to the custom role for the given folder.
|