I have been looking at the com.polarion.example.administration example. And i found that the class AdministrationServlet is never called on the example. Mainly because hivemodule.xml calls administration.jsp directly instead of registering AdministrationServlet as a contribution:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<module id="com.polarion.ImprovedGitConnector" version="1.0.0">
<contribution configuration-id="com.polarion.xray.webui.administrationPageExtenders">
<extender name="Page" parentNodeName="ImprovedGitConnector" parentNodeIconUrl="/polarion/icons/default/topicIcons/Tools_157-wrench.png" iconUrl="/polarion/icons/default/topicIconsSmall/Tools_158-wrench-2.png" pageUrl="/polarion/ImprovedGitConnector/administration.jsp?scope=$scope$" projectScope="true" projectGroupScope="true" repositoryScope="true"/>
</contribution>
</module>
Note the:
Code: Select all
pageUrl="/polarion/ImprovedGitConnector/administration.jsp?scope=$scope$"
Does any one know how do i register AdministrationServlet as a start point of that module on the com.polarion.xray.webui.administrationPageExtenders using hivemodule.xml?
If not, can any one tell me how do i get the user role on the jsp to make sure that user is a admin and can edit my configuration?