Configurable Admin Menu
From OpenI Wiki
| Table of contents |
[edit]
Overview
Default menu is still the same, with the same permissions. But if you want to customize the admin menu, now it's configurable in project.xml (no longer need to edit projectContext).
Originally developed for OpenI 1.2
[edit]
Permissions
- there is a list configured for each user type.
- user types have a hierarchy:
- application admin
- project admin
- project user
- higher users can see all menu items for that user, plus all the menu items for users below
- e.g. -
- project admin can see it's own list (manage project, configure datasource, etc)
- in addition to project user's list (create new analysis, manage files, upload files)
- but cannot see the app admin's menu list (manage application)
[edit]
Default admin menu
- if there is no menu configured, and default is provided:
<menuConfig>
<entry>
<string>projectAdminList</string>
<linked-list>
<org.openi.menu.MenuItem>
<url>editproject.htm</url>
<displayName>Manage Project</displayName>
</org.openi.menu.MenuItem>
<org.openi.menu.MenuItem>
<url>datasource.htm</url>
<displayName>Configure Datasource</displayName>
</org.openi.menu.MenuItem>
</linked-list>
</entry>
<entry>
<string>appAdminList</string>
<linked-list>
<org.openi.menu.MenuItem>
<url>editapplication.htm</url>
<displayName>Manage Application</displayName>
</org.openi.menu.MenuItem>
</linked-list>
</entry>
<entry>
<string>projectUserList</string>
<linked-list>
<org.openi.menu.MenuItem>
<url>managefiles.htm</url>
<displayName>Manage Files</displayName>
</org.openi.menu.MenuItem>
<org.openi.menu.MenuItem>
<url>uploadfile.htm</url>
<displayName>Upload File</displayName>
</org.openi.menu.MenuItem>
<org.openi.menu.MenuItem>
<url>newanalysis.htm</url>
<displayName>Create New Analysis</displayName>
</org.openi.menu.MenuItem>
</linked-list>
</entry>
</menuConfig>
[edit]
How to customize the admin menu
Let's say you want to add an item for project users:
- make sure you are in the projectUserList entry in project.xml
- add a node like this:
<org.openi.menu.MenuItem>
<url>admin/diagnostics.htm</url>
<displayName>New Diagnostics Link</displayName>
</org.openi.menu.MenuItem>
- links are relative to the main openi web application.
[edit]
What if there is no admin menu configured in project.xml?
- the default is used
- next time you save the project, the default will be populated in the project.xml file
