Administration
Finally, here are some special commands not available to normal users of VanCleve.com. Most of them are administrative, so unless you are me or an accquaintance of mine, you can just ignore this section.
execute
This command accesses Java's Runtime.exec() interface to run whatever follows the command "execute" as a native command. (I still don't know this interface very well, and the environment in which the native commands are executed is not very complete. On my Linux server, for example, it recognizes "pwd" but not "cd", for some reason. Obviously I can't do much without "cd", nor are special characters supported for colorization, etc., but this is still useful for simple commands such as "uptime".)
set log level
This changes the global "log level" for my application. The range is 1 to 10, where higher values produce more debugging information, and lower values produce less, for cleaner output.
get all globals
I thought this command was for displaying all the custom "global" settings for the current user, but in fact it displays all such properties not specific to any user or group. Perhaps some user- or group-specific variations will be useful at some point.
test
This is just a testbed command I use when developing new features. I think the original idea was, commands which had not been registered in the command access table would be inaccessible, so this command would be needed to develop them before committing them to the database. But that restriction is not in place. Which is a security issue, but implementing the restriction may be problematic. In the meantime, I can at least restrict access to this command.
Informational
The following commands are used to modify public information, such as the Message O' The Day. Mariposa has exclusive access to a couple of them.
set motd
set motd changes the Message O' The Day, which appears when the Terminal is first started. As easy as it is to use, you'd think I'd change the message more often!
set clevariant message
The Clevariant Message, which can be read using get clevariant message, naturally, can be changed with this command. Only I, Clevariant, can use it.
set clevariant mood
This command changes my "mood", which is represented by the emoticon that pops out of the left-hand side of the banner on the home page. It can also be displayed textually using get clevariant mood.
set mariposa message
Mariposa can use this command to change her personal message, which any user can read via get mariposa message.
set mariposa mood
This is the command Mariposa can use to set her "mood", which determines which emoticon (i.e. "happy face") pops out of the banner on the home page, on the right-hand side. The emoticon graphics were created by Mariposa herself. When this command prompts for a mood, if you're not sure what emotions there are, just press <enter>, and the list of available moods will be shown.
Commands
This group of commands is used to create and modify commands. Sounds recursive, doesn't it? Well, they don't actually create the commands in the application--I have to do that myself--but they define them in the database and assign them various access rules. The definitions are created with create command, during which a short descriptive blurb can be added, which is stored in the database as well to be used by the online help system. User access to commands can be set up on user and group bases using grant command, revoke command and remove command.
The remove command command does not delete, but rather removes access to, the command in question. This is different from revoke command, in that revoking a command specifically denies access to it and all it's children. Recall that the commands are hierarchical, such that, in the database at least, set menu is a command unto itself, and set menu right margin is a grandchild of it. Thus, access to the set menu command can be controlled explicitly, even though entering "set menu" alone produces an error. If it is revoked for a particular user or group, then none of its children (including set menu right margin) are available to that user or group. In this case, if remove command were executed for the set menu command, the explicit revocation would be removed, and access to the "subcommands" would fall upon themselves rather than the higher-level set menu. At least, I think this is the way it works.
create command
Use this command to define a new command in the database. If it is not one which the VanCleve.com server is programmed for, of course, the command will still fail.
grant command
After a command is "created" in the database, some access to it must be defined, if it is to be useful. grant command grants access to an existing command for a given user or group. To avoid ambiguity, groups are identified by their ID (see list groups), and users are identified by name.
revoke command
To revoke a command is to explicitly deny access to it for a given user or group. If a user attempts to execute a command, and that user or any group of which the user is a member has been denied access by the revoke command command, the user will be denied. Security is therefore exclusive by default, so if you have granted access to a certain group but wish to exclude one or two specific users within it, you can use this command.
remove command
This does not remove a command from the database. Rather, it removes any specific access to it for a given user or user group. After identifying the command to be altered, it will prompt again for the specific group or user, after which specifically granted or denied access to the command will be eliminated.
list command access
Use this command to discover which user groups and which specific users have been explicitly granted or denied access to a particular command.
list groups
list groups just outputs a list of the user groups defined within VanCleve.com. These groups help defined access to the various features of the site. Each user can be a member of one or more of them. If an account ID follows this command, the groups to which that user belongs are displayed.
list stored procedures
This command queries the database directly to list the names of all user-defined stored procedures (user-defined in terms of the database, that is), just for convenience.
create public menu item
This is used to create "global" menu items. It works like create menu item, except is will ask for a group ID, and the new menu item will belong to that group, instead of the current user. Such menu items will be available to all users in that group, though they will not be able to modify it.
create public menu folder
Create a menu folder with this command that belongs to a specific group, not a user. It will ask for the ID of the group (see list groups for a list of the groups).
create public menu link
By this command, a "public" menu item can be placed within a "public folder". It works like create menu link, except it is used to edit the menu for an entire group.