User Tools

Site Tools



Managing Embedded HTML

The administration tool for htmlOKay is the HTMLOK Access Manager, which is illustrated in this sample copy. It might be useful to open the copy in a separate window to follow along; otherwise, you can return to this discussion from the sample copy by clicking on its administration breadcrumb or title or on its Show page button. The copy doesn't, of course, have all of the functionality of the Manager; that is, you can't actually create HTML users with it. But in all other respects, it is the same. It contains two dialogs. At the top is a Selection Box of Namespaces and Files; at the bottom are two Tables, Users and Groups, where you assign the various access levels. Between them is a bar with three buttons, Save, Reset, and Scroll/Scroll Off. Let's look at each of these in turn.

Namespaces and Files

The top Selection Box consists of two rows and three columns:

Namespace [ namespace list ] ( Select Button )
Files [ File list ] Use Ctrl or Options key to multiple select from: html

A complete image of what the access manager looks like is illustrated here.

The namespace list follows the typographic convention of DokuWiki, which is colon-separated directory names: directory:subdirectory. The topmost, or root directory, of the namespace hierarchy is designated as
_ _ROOT_ _. To select a namespace, you highlight one of the namespace options from the drop-down menu and then click Select. The files in the selected namespace directory will appear in the scrollable File List below. Two additional options will be presented at the top of the file list:

  • No Files Selected
  • ALL

In addition, the name of the selected namespace will appear in the instruction box to the right of the File List. This instruction is basic PC and Mac keyboard selection protocol, which is to hold down either the PC's CTRL key or the Mac's option key if you want to select more than one file. Again selection is made by highlighting your choices. The highlighted selections will be the ones for which the access levels will be set in the Users and Groups dialog.

Selecting 'ALL'

If you select ALL, then any file present and future which is included in the selected directory will support embedded HTML at the level assigned in the Users and Groups dialog. If you instead select one or more files from this directory, then only those files will support HTML. Any other file in that directory will be treated as a normal file.

Selecting 'No Files Selected'

The default option is 'No Files Selected'. If you assign permissions and click Save but fail to select a File List option, leaving “No Files Selected”, you will receive an error message. If you click Save and no files have been selected and no permissions have been set, the Manager will delete the permissions for the selected namespace, if permissions exist; otherwise the request is ignored.

Users and Groups

The purpose of this dialog is to set permissions for the namespace and/or files selected in the Namespace dialog. There are two tables, one for groups and one for users. The Users table contains the basic information about each user, including a clickable email address. Next to each user or group is a set of radio buttons labeled H, M, L, and U, used for setting its access level. Clicking on these assigns the access levels for users and groups.

Obviously, only one access level can be assigned to any one user or group. Radio buttons are mutually exclusive, so that clicking one of these will undo any other choice made previously in its set. If you make a selection for a user or group and decide cancel permission for that user or group, then you can click the Reset label R in the column to the right of the access levels.

Multiple Permissions

Given the way the Manager is constructed, it is possible to assign access permissions to multiple users and groups for a namespace and its files. This feature allows teams to work on a project.

It is even possible to assign different access levels to different users and groups. Because of this possibility, htmlOKay sets a display policy, which is the access level at which a page will be displayed when viewed by an external visitor. This is the visitor who does not have HTML access to the page or someone who may have access but is not logged in. The display level is simply the most restrictive access level that has been assigned to that page. So that if someone with an H and someone with an M set of permissions have been working on the page, it will be displayed at H, which permits many fewer HTML techniques than M. Quite simply, the display policy opts for security.

One of the offshoots of assigning different access levels to a single page is that when the developer with the lesser access edits the page, any HTML which is not supported at the lesser access level will be marked as errors and excluded from display. Nevertheless, multiple access levels can have a good use in cases where there may be, say, a lead developer in a team project with greater latitude to create more advanced pages than others in the team. When the project is concluded, the entire namespace could be elevated to the lead developer's access level, which would then become the project's display policy.

Another side effect of setting multiple access levels is that a page may be cached at the higher access level so that as long as the page remains in the cache, it will be displayed to visitors at this higher level rather than at the display level. To meet this problem it is possible to provide a Refresh button, to re-process the page after the developer has logged out. Hitting the Refresh button after the developer logs out, causes the page to be re-processed at the display level.

Code for the the Refresh button will be found here.

Center Button Bar

The center button bar contains three buttons: Save, Reset, and Scroll.

  • Scroll
    Users and Groups are written to a scrollable window. Clicking Scroll will cause the scrollbars to appear, and the button name will change to Scroll off. In Firefox, if the Users or Groups dialog exceeds the height of the window, scrollbars will automatically appear.
  • Reset
    The Reset button will Unselect all Users and Group options for the selected namespace. This is in contrats to the R label beside each user and group, which lets you unset permissions individually.
  • Save
    After your choices have been completed, click Save. All the permissions will be saved for the selected namespace, and the selected files will be highlighted in the Namespace dialog.

Deleting and Reviewing

Deleting Permissions

If more than one set of access permissions has been applied to a namespace, permissions for any one of these can be deleted simply by clicking on the R label beside the relevant user or group. To delete all permissions for a namespace, click the Reset button and then click Save. The permissions will be removed.

Reviewing Permissions

When you Select a namespace from the Namespace dialog, all the permissions and selected files will be filled in. To alter the permissions, you simply re-set them and then click Save.

Namespace Scope

A namespace consists of a directory and its subdirectories. If individual files are selected, then only those files are covered by the permissions set for the namespace. But, if All is selected, then the entire namespace is covered by one set of access permissions. This includes not only all of its files but will also include all of its subdirectories and their files, unless separate permissions are set for the subdirectories.

When htmlOKay searches for permissions, it of course begins with the current namespace, i.e. the directory at issue. If it doesn't find permissions for that namespace, it progressively moves up one namespace in the namespace hierarchy until it finds a set of permissions or until it reaches the top of the hierarchy–which is the directory immediately below the root directory (i.e. below data/pages). It stops when it finds a set of permissions and applies those permissions to the current namespace. If it finds no permissions, then the namespace has no HTML access.

Because it stops at the directories immediately below data/pages, the permissions set for data/pages can't be used as a set of default permissions for the entire site.

administration.txt · Last modified: 2016/09/03 11:21 by tower