MySQL commands to make a user account an editor account

The easiest way to make a user an editor is to login to the site using the admin account and then use the web interface to select one or more base documents for the user.

Users with base documents are editors, editors are able to edit their base documents and any decendent documents.

If you do need to make a user an editor at a MySQL level then the following steps should work.

1. Find out the ID of the account you want to add a base document for:

  mysql> select * from Editor;

2. Get a list of the existing base documents for editors:

  mysql> select * from Base_Document;

3. Get a list of all the document IDs and the path of the document:

  mysql> select ID, Full_Path from Document;

4. Now you have enough information to add a record to the Base_Document table. If the front page of the site has ID 1 (Full_Path being /) and you want to give the user with ID 6 editor rights over the whole site then this will do it:

  mysql> insert Base_Document values (NULL, 6, 1);
This document was last modified on 2004-08-17 13:23:41.
MKDoc Ltd., 31 Psalter Lane, Sheffield, S11 8YL, UK.
Copyright © 2001-2005 MKDoc Ltd.