[Opensim-dev] Proposed feature addition to OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs (patch included)
James Stallings II
james.stallings at gmail.com
Thu May 26 23:19:51 UTC 2011
My apologies, but the previous code was completely ineffective on testing. I
know, it should be tested before submission. Mea Culpa, it looked really
good.
This, however, actually works:
1103d1102
<
1117,1125c1116,1125
<
< if (GetRequestingAgentID(remoteClient) != dataForAgentID)
< {
< if (!membership.ListInProfile)
< {
< // If we're sending group info to remoteclient about
another agent,
< // filter out groups the other agent doesn't want to
share.
< continue;
< }
---
> if
(!remoteClient.Scene.Permissions.IsGod(remoteClient.AgentID))
> if (GetRequestingAgentID(remoteClient) !=
dataForAgentID)
> {
> if (!membership.ListInProfile)
> {
> // If we're sending group info to remoteclient
about another agent,
> // filter out groups the other agent doesn't
want to share.
> continue;
> }
> }
1128d1127
<
1237,1242c1236,1237
< // c_scene and property accessor 'is_god' are in support of
the opertions to bypass 'hidden' group attributes for
< // those with a GodLike aspect.
< Scene c_scene = (Scene) requestingClient.Scene;
< bool is_god =
c_scene.Permissions.IsGod(requestingClient.AgentId);
<
< if(is_god) {
---
> if (requestingClient.AgentId != dataForAgentID)
> {
1248c1243
< membershipArray = membershipData.ToArray();
---
> membershipArray =
membershipData.FindAll(showInProfile).ToArray();
1252,1265c1247
<
< if (requestingClient.AgentId != dataForAgentID)
< {
< Predicate<GroupMembershipData> showInProfile =
delegate(GroupMembershipData membership)
< {
< return membership.ListInProfile;
< };
<
< membershipArray =
membershipData.FindAll(showInProfile).ToArray();
< }
< else
< {
< membershipArray = membershipData.ToArray();
< }
---
> membershipArray = membershipData.ToArray();
1266a1249
>
On Thu, May 26, 2011 at 11:36 AM, James Stallings II <
james.stallings at gmail.com> wrote:
> Greetings, OpenSimulator developers :)
>
> I'm writing to propose the addition of certain functionality
> to OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs, to
> wit:
>
> Present 'Hidden' groups and other related group detail to agents requesting
> such iniformation via CAPs as have assumed a 'godlike' aspect, or in other
> words, have successfully activated the administrative functionality in the
> client.
>
> The changes to the substance of the code involve credits more than not; a
> diff is both attached and included for convenient review. A fork has been
> created on github at git://github.com/JamesStallings/opensim.git which
> contains the changes for convenience should contribution of source be
> accepted. I will also open a mantis on the topic for the sake of
> thoroughness and attach the diff there.
>
>
> Many thanks and cheers!
>
> James Stallings aka Hiro Protagonist
>
>
> Diff follows:
>
> 1103,1107d1102
> < // c_scene and property accessor 'is_god' are in support of
> the opertions to bypass 'hidden' group attributes for
> < // those with a GodLike aspect.
> < Scene c_scene = (Scene) remoteClient.Scene;
> < bool is_god =
> c_scene.Permissions.IsGod(remoteClient.AgentId);
> <
> 1121,1138c1116,1126
> < // bypass the 'hidden' attributes of groups for those who
> have
> < // a GodLike aspect
> < //
> < // Big shout out to Dan Banner for showing me his running
> proof-of-concept and endorsing this idea as meaningful work
> < // Another big shout out to BlueWall Slade for helping me
> chase down all the elements required to properly access
> < // Scene and IClientAPI properties. JS aka HP
> < if (!is_god)
> < {
> < if (GetRequestingAgentID(remoteClient) !=
> dataForAgentID)
> < {
> < if (!membership.ListInProfile)
> < {
> < // If we're sending group info to remoteclient
> about another agent,
> < // filter out groups the other agent doesn't
> want to share.
> < continue;
> < }
> < }
> < }
> ---
> > if
> (!remoteClient.Scene.Permissions.IsGod(remoteClient.AgentID))
> > if (GetRequestingAgentID(remoteClient) !=
> dataForAgentID)
> > {
> > if (!membership.ListInProfile)
> > {
> > // If we're sending group info to
> remoteclient about another agent,
> > // filter out groups the other agent doesn't
> want to share.
> > continue;
> > }
> > }
> > }
>
>
> --
> ===================================
> http://simhost.com http://osgrid.org
> http://twitter.com/jstallings2
> http://www.linkedin.com/pub/5/770/a49
>
--
===================================
http://simhost.com http://osgrid.org
http://twitter.com/jstallings2
http://www.linkedin.com/pub/5/770/a49
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20110526/542515df/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: groupsmodule.cs-diff
Type: application/octet-stream
Size: 2260 bytes
Desc: not available
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20110526/542515df/attachment-0001.obj>
More information about the Opensim-dev
mailing list