Hi all,<div><br></div><div>Just wanted to share a bit of information for anyone else who may be implementing OSSL functions and attempting to restrict certain threat levels with the various permission flags in the opensim.ini configuration.  This message is particularly related to the PARCEL_GROUP_MEMBER flag.  </div>
<div><br></div><div><div><font face="arial, helvetica, sans-serif"><span style="line-height:19px">For more background </span></font>information on this topic, see the following links:</div><div><a href="http://opensimulator.org/wiki/OSSL">http://opensimulator.org/wiki/OSSL</a></div>
<div><a href="http://opensimulator.org/wiki/OSSL_Implemented">http://opensimulator.org/wiki/OSSL_Implemented</a></div><div><a href="http://opensimulator.org/wiki/OSSL_Enabling_Functions">http://opensimulator.org/wiki/OSSL_Enabling_Functions</a></div>
<div><a href="http://opensimulator.org/wiki/Threat_level">http://opensimulator.org/wiki/Threat_level</a></div></div><div><br></div><div>We are developing a HUD for a local school district that will animate student avatars to perform different kinds of classroom behaviors.  An overview of the project is at <a href="http://ucsim.uc.edu/blog/opensim/oak-hills-school-district/">http://ucsim.uc.edu/blog/opensim/oak-hills-school-district/</a> for those who may be curious.</div>
<div><br></div><div>In order to perform certain classroom misbehaviors like throwing a paperwad or using a cell phone in class, we wanted to take advantage of the osForceAttachToOtherAvatarFromInventory function to attach a paperwad or cell phone object to the avatar as the animation/sound effects play.  </div>
<div><br></div><div>This particular function is listed in the Severe threat level category, so we also wanted to try to restrict its use to just the students avatars in the project group and to a particular parcel of land where the project classroom sits.  We did this (or attempted anyway) by using the following configuration in our opensim.ini under the [XEngine] section:</div>
<div><br></div><div>AllowOSFunctions = true</div><div><br></div><div>OSFunctionThreatLevel = Moderate</div><div><br></div><div>Allow_osForceAttachToOtherAvatarFromInventory = PARCEL_GROUP_MEMBER, PARCEL_OWNER, ESTATE_MANAGER, ESTATE_OWNER</div>
<div><br></div><div>Now my understanding was that the PARCEL_GROUP_MEMBER flag would allow a user to use this function if:</div><div>a) the parcel of land where the script was run was owned by (deeded to) a particular group, </div>
<div>b) that user was also a member of that particular group, </div><div>c) the object containing the script was also set to the group.</div><div><br></div><div>However in our initial tests, it seemed as if the script was failing.  We double checked that the land was deeded to the group, that the user was invited to and a member of the same group, and both the HUD and the test attachment object were also set to the same group.  But when the user tried to trigger the script, it failed to work and resulted in the following error:</div>
<div><br></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:13px;line-height:19px;background-color:rgb(255,255,255)">ohsd_hud_v1.2.5 a: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: OSSL Runtime Error: osForceAttachToOtherAvatarFromInventory permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.</span><br style="font-family:arial,helvetica,sans-serif;font-size:13px;line-height:19px;background-color:rgb(255,255,255)">
<br style="font-family:arial,helvetica,sans-serif;font-size:13px;line-height:19px;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif"><span style="line-height:19px">We double checked all of the configurations and permissions again, and discovered two things that eventually led to the function working as we intended.  </span></font></div>
<div><font face="arial, helvetica, sans-serif"><span style="line-height:19px"><br></span></font></div><div><font face="arial, helvetica, sans-serif"><span style="line-height:19px">First, at least with the Imprudence viewer, it appears that when a user is invited to a group and accepts the invitation, the user is added to the group but that group is NOT set to be the active group by default (as happens, I believe, in Second Life).  So the user must go in and activate the group manually.</span></font></div>
<div><font face="arial, helvetica, sans-serif"><span style="line-height:19px"><br></span></font></div><div><font face="arial, helvetica, sans-serif"><span style="line-height:19px">Second, even after the group is activated, the function still would not run for the user until the user logged off and logged back in - then everything worked as expected.</span></font></div>
<div><font face="arial, helvetica, sans-serif"><span style="line-height:19px"><br></span></font></div><div><font face="arial, helvetica, sans-serif"><span style="line-height:19px">I don't know what part of this is related to the groups module, the viewer we're using (Imprudence in this case), or the way we've configured the function settings and the objects and scripts themselves, but it took some trial and error to discover that it isn't enough to just invite a user to the group for them to be able to use OSSL functions restricted by the PARCEL_GROUP_MEMBER flag.  End users have to accept the group invitation, activate the group manually, and then relog before it would work.</span></font></div>
<div><font face="arial, helvetica, sans-serif"><span style="line-height:19px"><br></span></font></div><div><font face="arial, helvetica, sans-serif"><span style="line-height:19px">Hope that helps someone else who might run into this and I'm trying to figure out where best to document this on the wiki for future reference.  </span></font></div>
<div><font face="arial, helvetica, sans-serif"><span style="line-height:19px"><br></span></font></div><div><span style="line-height:19px;font-family:arial,helvetica,sans-serif">- Chris/Fleep</span></div><div><font face="arial, helvetica, sans-serif"><span style="line-height:19px"><br>
</span></font></div><div><font face="arial, helvetica, sans-serif"><span style="line-height:19px"><br></span></font></div><div><font face="arial, helvetica, sans-serif"><span style="line-height:19px">Chris M. Collins (SL/OS: Fleep Tuque)</span></font></div>
<div><font face="arial, helvetica, sans-serif"><span style="line-height:19px">Center for Simulations & Virtual Environments Research (UCSIM)</span></font></div><div><font face="arial, helvetica, sans-serif"><span style="line-height:19px">UCIT Instructional & Research Computing</span></font></div>
<div><font face="arial, helvetica, sans-serif"><span style="line-height:19px">University of Cincinnati</span></font></div><div><font face="arial, helvetica, sans-serif"><span style="line-height:19px">406A Zimmer Hall</span></font></div>
<div><font face="arial, helvetica, sans-serif"><span style="line-height:19px">315 College Drive</span></font></div><div><font face="arial, helvetica, sans-serif"><span style="line-height:19px">PO BOX 210088</span></font></div>
<div><font face="arial, helvetica, sans-serif"><span style="line-height:19px">Cincinnati, OH 45221-0088</span></font></div><div><font face="arial, helvetica, sans-serif"><span style="line-height:19px"><a href="mailto:chris.collins@uc.edu">chris.collins@uc.edu</a></span></font></div>
<div><font face="arial, helvetica, sans-serif"><span style="line-height:19px">(513) 556-3018</span></font></div><div><font face="arial, helvetica, sans-serif"><span style="line-height:19px"><br></span></font></div><div><font face="arial, helvetica, sans-serif"><span style="line-height:19px"><a href="http://ucsim.uc.edu">http://ucsim.uc.edu</a></span></font></div>
<div><span style="font-family:arial,helvetica,sans-serif;font-size:13px;line-height:19px;background-color:rgb(255,255,255)"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:13px;line-height:19px;background-color:rgb(255,255,255)"><br>
</span></div>