Reputation: 6039
Need to check if the logged in user is a Developer, Owner or Viewer in google appengine in java.
This page explains about putting constraint such that the user have to be Administrator but I did not find any Java API whcih can give me the role .
Upvotes: 0
Views: 216
Reputation: 788
Unfortunately this is not possible. The Users service does not distinguish between different roles.
Per the python docs (I can't find this in the java documentaion):
An administrator is a user who can access the Administration Console for the application.
The api call checks for the presence of 'X-AppEngine-Inbound-User-Is-Admin' in the headers.
Upvotes: 1
Reputation: 599778
The UserService has an isUserAdmin()
method which gives this information.
Upvotes: 1