I downloaded "GoogleFileService-v0.3.zip" and deployed it as my
application.
It did not operate at the setting of the Google-Apps-Domain-
Authentication, though it operated at the setting of the Google-
Account-Authentication.
Please give the hint to me.
hiko
I am not sure if GAE supports Google-Apps-Domain Authentication or
not.
If not, you may implement your own logging-in process by using AuthSub
(http://code.google.com/intl/en/apis/accounts/docs/AuthSub.html)
The below url give the main idea. When logging-in from the web
application, you should use AuthSub instead of ClientLogin.
http://groups.google.com/group/google-appengine-java/browse_thread/thread/5c47fd656c7e84e8/5263f74c0754968a?hl=zh-TW&lnk=gst&q=httpclient&pli=1
tytung
It came to operate by adding the account of Google-Apps-Domain to the
developer.
However, it doesn't operate by non-developer account.
> Error: Server Error
>
> The server encountered an error and could not complete your
request.
> If the problem persists, please report your problem and mention
this error message and the query that caused it.
And, it operated by deleting the following sentences.
-- file_list.jsp --
if (!userService.isUserAdmin()) {
// [delete] query.setFilter("fileOwner == '"+userName+"'");
}
I challenge a little more.
hiko
On 2月11日, 午前2:20, tytung <tyt...@gmail.com> wrote:
> Hi hiko,
>
> I am not sure if GAE supports Google-Apps-Domain Authentication or
> not.
> If not, you may implement your own logging-in process by using AuthSub
> (http://code.google.com/intl/en/apis/accounts/docs/AuthSub.html)
>
> The below url give the main idea. When logging-in from the web
> application, you should use AuthSub instead of ClientLogin.http://groups.google.com/group/google-appengine-java/browse_thread/th...
Comment or delete query.setFilter("fileOwner == '"+userName+"'"); will
cause all uploaded files can be seen by every logged-in users, i.e.,
user A can see the files uploaded by user B.
Maybe you should use another method to set the name of logged-in user
to the variable userName instead of deleting it.
P.S.: The variable userName is set from 'config.jsp' ( userName =
userService.getCurrentUser().getNickname(); ).
tytung
> > > hiko- Hide quoted text -
>
> - Show quoted text -
As for the file, it did not change, and userName was also normal.
It operated though query.setOrdering("data desc") was deleted instead
of query.setFilter("fileOwner == '"+userName+"'")
> if (!userService.isUserAdmin()) {
> query.setFilter("fileOwner == '"+userName+"'");
> }
> // [Comment] query.setOrdering("data desc");
It seems to fail if setFilter and setOrdering are used at the same
time.
hiko
The methods setFilter and setOrdering can be used at the same time.
The official documentation is as follows:
http://code.google.com/intl/en/appengine/docs/java/datastore/queriesandindexes.html#Introducing_Queries
FYI
tytung
> > > - Show quoted text -- 隱藏被引用文字 -
>
> - 顯示被引用文字 -