Thanks Ikai, from documentation it seems an ID is not provided. I'll revert to something like this:
*Retrieve domain's users from the Google Data api *Store a temporary list of users with associated roles and their email as an identifier *When the user logs in, check for a temporary record and set the user ID to the value provided by the UserService I'll just have to handle the case of a user changing his email address between app installation and first login; I think I'll just give minimum permissions and notify domain administrator to set up proper permission set for the specific user. Thanks for your collaboration Regards Lorenzo On Dec 22, 10:19 pm, "Ikai Lan (Google)" <ikai.l+gro...@google.com> wrote: > Does a domain's user list contain an ID? We can't provide this ID to you > ahead of time. > > I think for your use case, it's safe to use the email and handle the edge > case of someone changing their email. > > -- > Ikai Lan > Developer Programs Engineer, Google App Engine > Blogger:http://googleappengine.blogspot.com > Reddit:http://www.reddit.com/r/appengine > Twitter:http://twitter.com/app_engine > > On Wed, Dec 22, 2010 at 2:27 AM, l.denardo <lorenzo.dena...@gmail.com>wrote: > > > Hello, > > I'm trying to figure out possible solutions for a problem. I'm > > currently using openID to authenticate users, restricting to Google as > > an identity provider (both gmail and Google Apps). > > > What I need to do is to obtain reliable user information before a user > > logs in to the application. Use case is simple: > > *I want to make the app installable to a Google Apps domain (say for > > the marketplace). > > *During installation, domain admin logs in to my application, and I > > retrieve domain's user list (tipically using Google Data java client > > library) > > *Domain admin configures roles for my application users (e.g. read > > only or read/write access). > > > Obviously, no other user in the domain has logged in. > > When the user logs in for the first time, I will have to apply correct > > roles and permissions, as provided during configuration. > > > Best way to do this should be to access the unique userID provided by > > UserService/User classes. According to documentation, this is the only > > stable identifier for a given user. > > So how is it possible to obtain it before the user logs in? > > I tried to use User class constructor User(java.lang.String email, > > java.lang.String authDomain), but this does not populate the ID. Is it > > safe to save the object you obtain from such constructor, store it in > > a temporary list, then compare it to the value returned by > > userService.getCurrentUser() and apply roles accordingly? > > > Thanks for any help on this > > Regards > > Lorenzo > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine for Java" group. > > To post to this group, send email to > > google-appengine-j...@googlegroups.com. > > To unsubscribe from this group, send email to > > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.