shindig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cassie <d...@google.com>
Subject Re: [jira] Updated: (SHINDIG-47) features/opensocial-samplecontainer/statefileparser.js mishandles isOwner and isViewer
Date Fri, 01 Feb 2008 23:50:00 GMT
Thanks Jamey!
I'm only going to make one change here for before submitting your patch,
instead of saying owner.isOwner = function(){return true;} I'm just going to
directly set the property: owner.isOwner_ = true;

- Cassie


On Fri, Feb 1, 2008 at 3:25 PM, Jamey Wood (JIRA) <jira@apache.org> wrote:

>
>     [
> https://issues.apache.org/jira/browse/SHINDIG-47?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> Jamey Wood updated SHINDIG-47:
> ------------------------------
>
>    Attachment: statefileparser.diff
>
> A diff which I believe fixes these issues.
>
> > features/opensocial-samplecontainer/statefileparser.js mishandles
> isOwner and isViewer
> >
> --------------------------------------------------------------------------------------
> >
> >                 Key: SHINDIG-47
> >                 URL: https://issues.apache.org/jira/browse/SHINDIG-47
> >             Project: Shindig
> >          Issue Type: Bug
> >          Components: Features
> >            Reporter: Jamey Wood
> >            Assignee: Kevin Brown
> >         Attachments: statefileparser.diff
> >
> >
> > The statefileparser.js in opensocial-samplecontainer does not properly
> setup the isOwner() and isViewer() status in certain cases.  One issue is
> that when owner==viewer, isOwner and isViewer are set to boolean values
> (instead of functions which return booleans):
> >    102    // If the id of the owner is the same as the viewer, then set
> the viewer
> >    103    // as the primary source of truth
> >    104    if (!owner || (viewer && owner.getId() == viewer.getId())) {
> >    105      owner = viewer;
> >    106      owner.isViewer = true;
> >    107      owner.isOwner = true;
> >    108    }
> > Another issue is that the isViewer and isOwner flags are passed to
> container.newPerson is the wrong order:
> >    197    return container.newPerson(fields, isViewer, isOwner);
> > ...vs the way they're expected (per
> features/opensocial-reference/container.js):
> >    285  opensocial.Container.prototype.newPerson = function(opt_params,
> opt_isOwner, opt_isViewer) {
> > The end result of all of this is that the isViewer() and isOwner() calls
> will misbehave in many cases when using opensocial-samplecontainer.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message