add GetFullGroupPowers(agentID, groupID) to groups modules. This returns the 'sum' of powers of all agent roles on that group, apply it to some OSSL (mantis 8777). It May be needed elsewhere

This commit is contained in:
UbitUmarov
2020-10-09 00:20:34 +01:00
parent 89ccd601b1
commit 128e0be382
5 changed files with 68 additions and 8 deletions

View File

@@ -763,6 +763,31 @@ namespace OpenSim.Groups
return data;
}
public ulong GetFullGroupPowers(UUID agentID, UUID groupID)
{
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
List<GroupRolesData> data = m_groupData.GetGroupRoles(agentID.ToString(), groupID);
if (data == null || data.Count == 0)
return 0;
ulong powers = 0;
for (int i = 0; i < data.Count; ++i)
{
powers |= data[i].Powers;
}
return powers;
}
public List<GroupRolesData> GroupRoleDataRequest(UUID agentID, UUID groupID)
{
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
List<GroupRolesData> data = m_groupData.GetGroupRoles(agentID.ToString(), groupID);
return data;
}
public List<GroupRolesData> GroupRoleDataRequest(IClientAPI remoteClient, UUID groupID)
{
if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);