← Back to team overview

mugle-dev team mailing list archive

Re: GameEditBuilder

 

>
> How can I find out the maximum allowed length of game name and description,
> for example? I would like to restrict the textbox input accordingly.
>

As far as I remember, we have allowed any length on the backend, it's simply
a string that already doesn't exist.

When modifying the name or description of a game, do I need to check that
> the string is a valid one (e.g. not an empty string) or is that going to
> happen in the backend?
>

As to editing names and descriptions. Developers are not allowed to change
the "name" (referring to the unique URL name given for a game, user,
devteam, etc).
However, the users are allowed to change their Full Name, and similar rules
apply for games and dev teams. This means, potentially the description can
be empty as far as the
backend if concerned. Come to think of it, I'm not quite sure if this is the
best option, but for now, I think the checking for empty strings should be
done on client no matter what.


> When modifying fields of model objects, is the backend going to check
> whether the current user actually has the right to do so?
>

Yes, we have checks on the backend that actually checks read/write access of
the current user. This applies to each object as a whole and also fields as
well.
For exmaple, a GUEST user has permission to edit his User object, as he/she
should be able to modify their Full Name. But when saving the object back in
the database,
we allow only the Full Name (and other certain fields) to be
updated/modified. All this happens in the backend and also returns an
updated copy of the same object.
And if a modification was discarded due to lack of write permission, this
can be checked on the returned object.

How can I best check whether the current user is allowed to see the game
> edit view for a particular game?
>

There's no particular service method for this yet, but I think this is
something important for all editable objects.
I shall get started on this soon.

To change a field of a model class in the datastore, is it correct to do
> something like this:
> gameVersion.setFullName("bla");
> gameVersion.write(new AsyncCallback<GameVersion>() {
>       ...
> });
>

This seems correct to me.


> Somehow the onSuccess method of my callback object is called but the value
> in the datastore isn't changed. I login with the user matt, who appears to
> be linked to devteam test and game test, and call the following URL to
> display the game edit view (which at this moment only consists of a text box
> for the name of the game):
> http://127.0.0.1:8080/#!/test/test/+edit


  I'll check on this as well.


> Everytime I load this URL for the first time or hit the browser refresh
> button, I receive the following very weird exception:
>
> Fc is null stack: Ic("test")@
>> http://127.0.0.1:8080/mugle/129D7154D4CA62DF77704779CB590D6C.cache.html:1347Id("!/test/test/+edit",[object Object],[object Object])@
>> http://127.0.0.1:8080/mugle/129D7154D4CA62DF77704779CB590D6C.cache.html:1356Fd([object Object],[object Object])@
>> http://127.0.0.1:8080/mugle/129D7154D4CA62DF77704779CB590D6C.cache.html:1367Yb([object Object])@
>> http://127.0.0.1:8080/mugle/129D7154D4CA62DF77704779CB590D6C.cache.html:1376RE([object Object],[object Object])@
>> http://127.0.0.1:8080/mugle/129D7154D4CA62DF77704779CB590D6C.cache.html:1362Uq([object Object],[object Object])@
>> http://127.0.0.1:8080/mugle/129D7154D4CA62DF77704779CB590D6C.cache.html:1227Ar([object XMLHttpRequest])@
>> http://127.0.0.1:8080/mugle/129D7154D4CA62DF77704779CB590D6C.cache.html:1379([object Event])@
>> http://127.0.0.1:8080/mugle/129D7154D4CA62DF77704779CB590D6C.cache.html:998Fl((function () {b.W(c);}),[object XMLHttpRequest],[object Arguments])@
>> http://127.0.0.1:8080/mugle/129D7154D4CA62DF77704779CB590D6C.cache.html:818Il((function () {b.W(c);}),[object XMLHttpRequest],[object Arguments])@
>> http://127.0.0.1:8080/mugle/129D7154D4CA62DF77704779CB590D6C.cache.html:1054([object Event])@
>> http://127.0.0.1:8080/mugle/129D7154D4CA62DF77704779CB590D6C.cache.html:1053fileName:
>> http://127.0.0.1:8080/mugle/129D7154D4CA62DF77704779CB590D6C.cache.htmllineNumber: 1347
>>
>
> Has anyone seen this somewhere already? This doesn't happen if I move to a
> different page first and then type the URL to edit the game into the browser
> address bar and hit enter.
>
>
I haven't seen this though. I have a feeling it's to do with the history
token, best is to check with Scott.

-- 
*Prageeth Silva*

Follow ups

References