>
> *@RequiresRole("superAdmin")*
> *@UiField*
> *CheckBox makeAdmin *
>
> this code is too specific for me: I'm creating a CMS and I cannot attach
> hardcoded roles to my fields: each solution will make its own decision on
> what fields are allowed for which profile.
>
Well ok. A CMS is permission based because users of your CMS can create
their own roles. Instead of @RequireRole("superAdmin") you would then use
@RequirePermission("canMakePersonToAdmin") . Then you check if a user has
the permission.
We do the same for one of our apps. All permissions (the effective
permissions as a user can have multiple roles defined by our customers) are
embedded in our index.html file as JSON. The app loads this JSON and then
has a userSession.hasPermission(<string / enum>) to get the information.
Then you only have to generate the glue code for configuring the view.
So this approach is possible for both situations: static roles or dynamic
roles that pull in permissions of a static set of permissions defined by
the app.
-- J.
--
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.