diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index a972ca6..53556ab 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -411,18 +411,23 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
411 | // with the powers requested (powers = 0 for no powers check) | 411 | // with the powers requested (powers = 0 for no powers check) |
412 | protected bool IsGroupMember(UUID groupID, UUID userID, ulong powers) | 412 | protected bool IsGroupMember(UUID groupID, UUID userID, ulong powers) |
413 | { | 413 | { |
414 | if (null == m_groupsModule) | 414 | //DateTime t1 = DateTime.Now; |
415 | return false; | 415 | bool result = false; |
416 | 416 | ||
417 | GroupMembershipData gmd = m_groupsModule.GetMembershipData(groupID, userID); | 417 | if (null != m_groupsModule) |
418 | |||
419 | if (gmd != null) | ||
420 | { | 418 | { |
421 | if (((gmd.GroupPowers != 0) && powers == 0) || (gmd.GroupPowers & powers) == powers) | 419 | GroupMembershipData gmd = m_groupsModule.GetMembershipData(groupID, userID); |
422 | return true; | 420 | |
421 | if (gmd != null) | ||
422 | { | ||
423 | if (((gmd.GroupPowers != 0) && powers == 0) || (gmd.GroupPowers & powers) == powers) | ||
424 | result = true; | ||
425 | } | ||
423 | } | 426 | } |
427 | |||
428 | //m_log.DebugFormat("[PERMISSIONS]: Group member check took {0}", (DateTime.Now - t1).TotalMilliseconds); | ||
424 | 429 | ||
425 | return false; | 430 | return result; |
426 | } | 431 | } |
427 | 432 | ||
428 | /// <summary> | 433 | /// <summary> |