You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Cassie Doll (JIRA)" <ji...@apache.org> on 2008/02/11 21:50:08 UTC

[jira] Closed: (SHINDIG-47) features/opensocial-samplecontainer/statefileparser.js mishandles isOwner and isViewer

     [ https://issues.apache.org/jira/browse/SHINDIG-47?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cassie Doll closed SHINDIG-47.
------------------------------

    Resolution: Fixed
      Assignee: Cassie Doll  (was: Kevin Brown)

> 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: Cassie Doll
>         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.