ok. It looks like we could extend the Permissions object to create our own 
permissions granting system. 
Thanks.

> 
> Thanks.
> My impression is we should implement our own solution either client side as 
> in your example or server side.
> It looks to me like requestPermission and hasPermission need play no part in 
> this. This methods seem not to be very developed in the spec as the only 
> field you can pass to check is 'VIEWER'. Am I correct in thinking that it 
> makes more sense to deal with permissions for creating activities and sending 
> messages in our own way and not try to use this defined calls?
> with thanks
> Justin Wyllie
> 
> 
> 
> Implementing the UI flows to intercept this is something that
> containers are responsible for.  Each container tends to do this in a
> different way.
> 
> You can subclass jsonrpccontainer.js and implement a better version of this:
> 
> JsonRpcContainer.prototype.requestCreateActivity =
> function(activity, priority,
> opt_callback) {
> opt_callback = opt_callback || function() {};
> 
> var req = opensocial.newDataRequest();
> var viewer = opensocial.newIdSpec({'userId' : 'VIEWER'});
> req.add(this.newCreateActivityRequest(viewer, activity), 'key');
> req.send(function(response) {
> opt_callback(response.get('key'));
> });
> };
> 
> >
>   
> > 
> > On Thu, Nov 25, 2010 at 9:31 AM, Justin Wyllie
> > <[email protected]> wrote:
> > >
> > > Hi
> > > The Spec (0.9) for requestCreateActivity says: 
> > > opensocial.requestCreateActivity(activity, priority, opt_callback)
> > > where priority is either
> > > opensocial.CreateActivityPriority.HIGH or 
> > > opensocial.CreateActivityPriority.LOW
> > >
> > > The spec says. "If the activity is of high importance, it will be created 
> > > even if this requires asking the user for permission"
> > >
> > > My understanding from this is that if it is HIGH the container should ask 
> > > the user for permission if the gadget wants to create an activity - 
> > > presumably by calling requestPermission().
> > >
> > > But in my test gadget we call requestCreateActivity with HIGH priority 
> > > and requestPermission is not called. The priority flag is passed to the 
> > > requestCreateActivity function but that does nothing with it.
> > >
> > > So - is this feature just not implemented?
> > >
> > > I am using Shindig 2.0 (the PHP version though I don't know if that makes 
> > > a difference to the Javascript).
> > > Thanks
> > > Justin Wyllie
> > >
> > >
> > 
> > 
> > 
> > -- 
> > Paul Lindner -- [email protected] -- linkedin.com/in/plindner
>                                         
                                          

Reply via email to