A robust starter web application to ease Java webapp development.

Home | Tutorials | Demos | Issues

 « Return to Thread: Insert sample data into Oracle database

Re: Problem with access control in top menu

by Pankaj :: Rate this Message:

Reply to Author | View in Thread

Hi Matt,

     I am attaching my menu-config.xml.
     All I did is add a new menu called "CicosopMenu"
and in one of the item tags "EditSopDocuments" added
roles="admin".
     Now it works fine if I login as admin and shows
all the links; logout and log back in as 'user' (hides
the link with tag EditSopDocuments). But when I login
as admin again, the link  with tag EditSopDocuments is
not shown. If I restart my server, then the same
process follows.
 
     Thanks for your help and time.

Pankaj

--- Matt Raible <mraible@...> wrote:

> Sounds like a bug in Struts Menu.  I thought I fixed
> this, but
> apparently not.  Can you send me your
> menu-config.xml and steps to
> reproduce?
>
> Thanks,
>
> Matt
>
> On 8/8/06, pankaj singla <pinkoo_78@...>
> wrote:
> > I replaced struts-menu-2.4.1.jar with
> > struts-menu-2.4.2.jar by copying this jar in the
> lib
> > directory and updating lib.properties. But it
> still is
> > behaving the same way i.e. I cannot see the link
> once
> > I login in as 'user' and then login as 'admin'.
> >     Any other suggestions....
> >
> > Thanks,
> > Pankaj
> >
> >
> >
> > --- Matt Raible <mraible@...> wrote:
> >
> > > Can you try replacing your Struts Menu JAR with
> the
> > > following:
> > >
> > >
> >
>
http://static.appfuse.org/downloads/struts-menu-2.4.2.jar

> > >
> > > Thanks,
> > >
> > > Matt
> > >
> > > On 8/8/06, pankaj singla <pinkoo_78@...>
> > > wrote:
> > > > Hi,
> > > >
> > > >    I am using appfuse 1.9.3 with
> struts/spring. I
> > > have
> > > > created a new menu in the top menu and added
> some
> > > > items in it. But I want to limit access for a
> > > > particular item to only admins. So, I added
> > > > roles="admin" in the code as following:
> > > >
> > > > <Menu name="CicosopMenu" title="menu.cicosop"
> > > > description="S.O.P Menu" width="100"
> forward="xyz"
> > > > roles="admin,user">
> > > > <Item name="SopDocuments"
> > > title="menu.editCicosopDoc"
> > > > forward="editableCicosopDoc" roles="admin"/>
> > > > </Menu>
> > > >
> > > > The problem I am having now is that it works
> fine
> > > the
> > > > first time I login in as admin and shows the
> link.
> > > It
> > > > also works fine if I logout and sign with a
> > > non-admin
> > > > user (i.e. it doesn't show the link). But now
> if I
> > > > login again it doesn't show the link anymore.
> If I
> > > > restart the tomcat server, it follows the same
> > > steps.
> > > >
> > > >      Could anyone help me with this problem or
> > > suggest
> > > > some other way to limit the access in top
> menu.
> > > >
> > > > Thanks,
> > > >
> > > > Pankaj
> > > >
> > > >
> __________________________________________________
> > > > Do You Yahoo!?
> > > > Tired of spam?  Yahoo! Mail has the best spam
> > > protection around
> > > > http://mail.yahoo.com
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------

> > > > To unsubscribe, e-mail:
> > > users-unsubscribe@...
> > > > For additional commands, e-mail:
> > > users-help@...
> > > >
> > > >
> > >
> > >
> >
>
---------------------------------------------------------------------

> > > To unsubscribe, e-mail:
> > > users-unsubscribe@...
> > > For additional commands, e-mail:
> > > users-help@...
> > >
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@...
> > For additional commands, e-mail:
> users-help@...
> >
> >
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@...
> For additional commands, e-mail:
> users-help@...
>
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
<?xml version="1.0" encoding="UTF-8"?>
<MenuConfig>
    <Displayers>
        <Displayer name="Velocity" type="net.sf.navigator.displayer.VelocityMenuDisplayer"/>
    </Displayers>
    <Menus>
        <Menu name="MainMenu" title="mainMenu.title" page="/mainMenu.html"/>
        <Menu name="UserMenu" title="menu.user" description="User Menu" forward="editProfile" roles="admin,user"/>
        <Menu name="FileUpload" title="menu.selectFile" description="File Upload" width="100" forward="selectFile" roles="admin,user"/>
        <Menu name="CicosopMenu" title="menu.cicosop" description="S.O.P Menu" width="100" forward="viewableCicosopDoc" roles="admin,user">
        <Item name="EditSopDocuments" title="menu.editCicosopDoc" forward="editableCicosopDoc" roles="admin"/>
        <Item name="ViewSopDocuments" title="menu.viewCicosopDoc" forward="viewableCicosopDoc"/>
            <Item name="SearchSop" title="menu.searchSopDoc" page="/searchSopDoc.html"/>
        </Menu>

        <Menu name="AdminMenu" title="menu.admin" description="Admin Menu" roles="admin" width="120" forward="viewUsers">
            <Item name="ViewUsers" title="menu.admin.users" forward="viewUsers"/>
            <Item name="ActiveUsers" title="mainMenu.activeUsers" action="activeUsers"/>
            <Item name="ReloadContext" title="menu.admin.reload" action="reload"/>
            <Item name="FlushCache" title="menu.flushCache" action="flush"/>
            <Item name="Clickstream" title="menu.clickstream" page="/clickstreams.jsp"/>
        </Menu>
        <Menu name="Logout" title="user.logout" page="/logout.jsp" roles="admin,user"/>
    </Menus>
</MenuConfig>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: Insert sample data into Oracle database