Re: [Acegisecurity-developer] Struts menu with Acegi

2005-07-10 Thread Marco Mistroni
Hello Ben,
   yes it worked fine, however i found out a different problem (which
i doubt is due to acegi).
I have two users, one with 2 roles (USER & SUPERVISOR) and another
with only 1 role (USER).
i have 3 menu, and if i configure one of them available to SUPERVISOR
only, for some weird reasons that 'settings' override everything, so
that users iwth only USER role won't be able to see any menu at
all
i put some logging, and i was able to see that acegi behaviour is just
fine (hte user with 2 roles has in fact 2 granted authorities)..

i'll get back when i can find out what's wrong with struts menu...

thanx and regards
  marco

On 7/11/05, Ben Alex <[EMAIL PROTECTED]> wrote:
> Marco Mistroni wrote:
> 
> >will this be a correct declaration in web.xml?
> >
> >
> >ContextHolderAware Filter
> >
> > net.sf.acegisecurity.util.FilterToBeanProxy
> >
> >targetClass
> >
> > net.sf.acegisecurity.wrapper.ContextHolderAwareRequestFilter
> >
> >   
> >
> >
> >
> >
> >  ContextHolderAware Filter
> >  /*
> >
> >
> >
> >
> >
> This looks correct to me. Are your filter orders correct? See
> http://acegisecurity.sourceforge.net/docbook/acegi.html#security-filters-order.
> 
> Best regards
> Ben
> 
> 
> ---
> This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
> July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
> core and dual graphics technology at this free one hour event hosted by HP,
> AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
> ___
> Home: http://acegisecurity.sourceforge.net
> Acegisecurity-developer mailing list
> Acegisecurity-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
>


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Home: http://acegisecurity.sourceforge.net
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer


Re: [Acegisecurity-developer] Struts menu with Acegi

2005-07-10 Thread Ben Alex

Marco Mistroni wrote:


will this be a correct declaration in web.xml?


   ContextHolderAware Filter
   net.sf.acegisecurity.util.FilterToBeanProxy
   
   targetClass
   
net.sf.acegisecurity.wrapper.ContextHolderAwareRequestFilter
   
  




 ContextHolderAware Filter
 /*



 

This looks correct to me. Are your filter orders correct? See 
http://acegisecurity.sourceforge.net/docbook/acegi.html#security-filters-order.


Best regards
Ben


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar

___
Home: http://acegisecurity.sourceforge.net
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer


Re: [Acegisecurity-developer] Struts menu with Acegi

2005-07-07 Thread Marco Mistroni
Hello Ben,
   i followed what you told me... 
i read docs and wrote a  beanRefFactory.xml file that i placed into
jboss/server/default/conf

i have updated login-config.xml in the above file
i  have moved (as suggested by docs) some jars to
jboss/server/default/lib directory

however i am missing something./... do i need to declare any filters
in my application's web.xml?#
you were talking about ContextHolderAwareRequestFilter 

will this be a correct declaration in web.xml?


ContextHolderAware Filter
net.sf.acegisecurity.util.FilterToBeanProxy

targetClass

net.sf.acegisecurity.wrapper.ContextHolderAwareRequestFilter

   




  ContextHolderAware Filter
  /*



are there any other filters that need to be declared?

thanks in advance and regards
  marco





On 6/29/05, Ben Alex <[EMAIL PROTECTED]> wrote:
> Marco Mistroni wrote:
> 
> >Hello all,
> >   has anyone ever used Struts Menu together wtih Acegi?
> >Following what's explained in this link
> >http://struts-menu.sourceforge.net/security.html
> >
> >i would like to implement my own PermissionAdapter that uses Acegi in
> >order to load dynamically menu items for my application..
> >
> >
> >
> >
> Hi Macro
> 
> I just read
> http://struts-menu.sourceforge.net/apidocs/net/sf/navigator/menu/RolesPermissionsAdapter.html
> and looked at its source at
> http://struts-menu.sourceforge.net/xref/net/sf/navigator/menu/RolesPermissionsAdapter.html,
> and it simply uses HttpServletRequest.isUserInRole(String) internally.
> Thus, you can use the ContextHolderAwareRequestFilter to interface this
> tool with Acegi Security. It's discussed more at
> http://acegisecurity.sourceforge.net/docbook/acegi.html#security-container-adapters-overview.
> 
> Best regards
> Ben
> 
> 
> ---
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> ___
> Home: http://acegisecurity.sourceforge.net
> Acegisecurity-developer mailing list
> Acegisecurity-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
>


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Home: http://acegisecurity.sourceforge.net
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer


Re: [Acegisecurity-developer] Struts menu with Acegi

2005-06-28 Thread Ben Alex

Marco Mistroni wrote:


Hello all,
  has anyone ever used Struts Menu together wtih Acegi?
Following what's explained in this link
http://struts-menu.sourceforge.net/security.html

i would like to implement my own PermissionAdapter that uses Acegi in
order to load dynamically menu items for my application..


 


Hi Macro

I just read 
http://struts-menu.sourceforge.net/apidocs/net/sf/navigator/menu/RolesPermissionsAdapter.html 
and looked at its source at 
http://struts-menu.sourceforge.net/xref/net/sf/navigator/menu/RolesPermissionsAdapter.html, 
and it simply uses HttpServletRequest.isUserInRole(String) internally. 
Thus, you can use the ContextHolderAwareRequestFilter to interface this 
tool with Acegi Security. It's discussed more at 
http://acegisecurity.sourceforge.net/docbook/acegi.html#security-container-adapters-overview.


Best regards
Ben


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
Home: http://acegisecurity.sourceforge.net
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer


[Acegisecurity-developer] Struts menu with Acegi

2005-06-28 Thread Marco Mistroni
Hello all,
   has anyone ever used Struts Menu together wtih Acegi?
Following what's explained in this link
http://struts-menu.sourceforge.net/security.html

i would like to implement my own PermissionAdapter that uses Acegi in
order to load dynamically menu items for my application..

here is what docs says

.Struts Menu comes with a single concrete implementation of the
PermissionsAdapter, called RolesPermissionsAdapter. This adapter maps
the user's security roles as defined in the application/appserver
configuration against a list of permitted roles defined for each
menu/menu item in menu-config.xml

Since i already have the possibilty to specify permissions in my
database using acegi's database tables, i was wondering if the correct
path to follow was to check the user table to see the role of the
user...

the problem is how do i get to the roles (such as ROLE_SUPERVISOR)
defined in user table?

by browsing docs, i found out that those  ROLE_X are  available via
SecurityConfig.getAttribute, but i don't know how to get to
SecurityConfig from Authentication...

anyone could help?

thanx in advance and regards
   marco


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
___
Home: http://acegisecurity.sourceforge.net
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer