Menu
Menu helps users to navigate between tables and other elements of the database. It can be differently displayed depending on the user roles.
Default menu
If menu section of a schema is empty, the default menu is displayed. Default menu contains single "Tables" section displaying a set of links to all tables in the application. When a new table or view is added, it automatically appears in the "Tables" section of the menu.
Additionally, if a user is an admin of the database, the "Tables" section contains "Add new table" link to the tables section of the Schema Editor.
Moreover admin sees another section ("Administration") tn the menu. The section is described further in the article.
Menu structure
There are two levels of organization of the application's menu: sections and items. Items are direct links to tables, pivots, etc. Sections are used to groups.
Menu may contain any number of sections. A section may contain any number of items. There is no limit of number of items leading to the same element of an application.
Structure of menu's section
Definition of menu section contains the following elements:
-
Name must be unique in the menu.
-
Title is displayed to a user. When it is not specified, the name is used instead. Title do not have to be unique. It is common to create a few menu sections with the same title, but with different roles assignment.
-
Items - list of the content of the menu section.
-
Roles - let you to specify which roles can see this section of menu. If no role is specified, the section is considered as accessible for all users.
Role based mechanism of limiting the visibility of menu's sections do not secure data from unauthorized access. To provide real restriction use the access control mechanism.
Structure of menu's item
Every item of a menu section is composed of the following elements:
-
Name must be unique in the menu's section (but not in the whole menu).
-
Title is displayed to a user. When it is not specified, the name is used instead. Title do not have to be unique. It is common to create a few menu items with the same title, but with different roles assignment.
-
Target defines what will be displayed after clicking the item. Types of target are described in the next section of this page.
-
Roles section enumerates for which roles the item is be displayed. If no role is specified, the item is considered as accessible for all users. Note that it cannot overwrite the section limits. So, if the section whole is not accessible for a given role, then no item in it section will be displayed, even if it is explicitly assigned at the item level.
Role based mechanism of limiting the visibility of menu's items do not secure data from unauthorized access. To provide real restriction use the access control mechanism.
Types of menu items
A menu item may target the following elements:
-
Vtable - list of records of table or view selected as a parameter of this option.
-
New - direct link to the form of new table/view creation. The target table or view must be selected as a parameter.
-
Pivot - a pivot table selected as a parameter.
-
URL address - is the address in the space of an application. In most cases it is used to display some PHP extensions.
Administration section of menu
The "Administration" section of the menu is always displayed as the last one and is accessible for an administrator of the application. It is added automatically, so you will not find it's definition in the Schema Editor.
In the section an administrator always can find:
-
Link to the Schema Editor.
-
Link to administration tools.
-
Links to all tables defined in the schema.
-
Links to all views defined in the schema.
-
Links to all pivots defined in the schema.
Note that links leading to the pivots are different in the standard menu section and in the "Administration" section (visible for admins only). In the first case a link leads to a ready pivot report. In the latter it leads to the pivot editor with all the values preset.