Thanks for your reply and also for the explanation of the permission process.

I have some more question, suppose I have 3 users whome I want to give different menu. First I'll make a permission form there the permission menus names will be granted to them and store this names into the database. Now question 1: how do I'll get the names to the menus that I give permission to the corrseponding user.

After the user loged on the system, I have to generate the menu for him. So I think I have to collect those names from the database and construct the menu. Here question is how I'll contract a permissionAdapter for this specific user.

I don't know whether I could help you to understand the problem, in summary I want to generate menu according to a specific user.

Thank you,

Mahbub



From: "Scott Sayles" <[EMAIL PROTECTED]>
To: "'Mahbub ul Huq Bin Kabir'" <[EMAIL PROTECTED]>
Subject: RE: Struts-Menu1.2
Date: Wed, 6 Aug 2003 11:32:25 -0400

> This is trird time I'm writing to you, only on this hope that
> may be you'll
> reply this time.
>
My apologies for not responding to you sooner.

> I'm getting confused with Struts-Menu Permission module and
> your example.
>
> When the SetPermissionsAction called it gets a parameter from
> the request
> named "menus", I think this is the menu which one is hoing to
> display, but
> where are you setting this parameter? I could not find it any where.
>

Line 62:
PermissionsAdapter permissions = new SimplePermissionsAdapter(menus);

> Please tell me how I'll set permissions, please.
>
You can set your permissions however you see fit.  But you'll probably
need to implement your own PermissionsAdapter.

Permissions are handled in a very generic and flexible way.  A
MenuDisplayer may take a PermissionsAdapter (as specified in the jsp
tag) in which it asks it if a menu isAllowed(menuName).  The only thing
you have to do is provide the PermissionsAdapter.  However, note that
not all of the MenuDisplayers utilize PermissionsAdapters at this time.

The *only* permissions checking provided for by default is through the
use of the RolesPermissionsAdapter in which it checks to see if a menu
is associated with the current user's role.  The roles are specified in
the menus defined in the XML file.  If you wish to perform your own form
of permissions checking, then you'll need to implement your own
PermissionsAdapter.  Hence the name.  It's an adapter that you provide
so that struts-menu can work with your own permissions checking
mechanisms.  Whether that's through the use of a database, ldap, jaas,
or whatever is up to you.  struts-menu does not care because it only
talks to a PermissionsAdapter.  It's up to you to provide one (or use
the included role based one).

Let me know if you still have any problems or questions about this.

BTW, there is a struts-menu-user mailing list:

[EMAIL PROTECTED]


Scott



_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
struts-menu-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/struts-menu-user

Reply via email to