Hi Joseph and Jens,

I didn't have the time to answer to your comments yesterday. 
 *Instead of @RequireRole("superAdmin") you would then use 
@RequirePermission("canMakePersonToAdmin") . *

It's pretty the same: my issue is that I cannot group widgets under the 
same umbrella : nothing says that is a profile "pizzayolo" will have access 
to button A and B in a given solution implementation, the buttons A and B 
will not be able to be accessed by the same profile for a second 
implementation, each will require an independent condition. So I need a per 
widget granularity of permissions.

Hi Joseph, 
* the same widget is retained in the DOM and reused many times for the sake 
of speed and conserving memory.*

this is not an issue since a user who doesn't have rights will consume less 
resources anyway. If he loggs in as a different profile with more 
permissions, the widgets will be created eagerly and conserved (this is the 
job of the ClientFactory which indirectly delegates the call to the 
UiBinder, so it is easy to invalidate widgets on logout, or completely 
reload the page)

Thanks again for your answers

Le dimanche 18 mai 2014 22:01:33 UTC+1, Zied Hamdi OneView a écrit :
>
> Hi all,
>
> I have a special need in authorization where I want to control if UiBinder 
> will create or not a widget (I could use visibility visible={roles.admin} 
> in my widgets but I want a smarter solution).
>
> I'd like to use the info in ui:field at template parsing and decide 
> whether the field should be created or not: a central singleton will say if 
> yes or no, that element should be created.
>
> So is there an extension point where I can centrally intercept the 
> internal widget factory?
>
> If the idea is not clear, I'd like to extend a GWT class where I could 
> have a method somehow like
>
>  public  void createWidget( Class widgetClass, Widget parent, String 
> uiField ) 
>
> then rebind the default factory interface with mine in the module 
> definition.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to