diff options
author | Teravus Ovares (Dan Olivares) | 2009-09-04 04:25:56 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-09-04 04:25:56 -0400 |
commit | f7861a6badd7b62ab6f2607e52b642918e4fff31 (patch) | |
tree | 909f52b0a18e198b4f7425ed5866fd19e9fb3e26 | |
parent | * Fix for GetTerrainHeightAtXY to make it compatible when Constants.RegionSiz... (diff) | |
download | opensim-SC-f7861a6badd7b62ab6f2607e52b642918e4fff31.zip opensim-SC-f7861a6badd7b62ab6f2607e52b642918e4fff31.tar.gz opensim-SC-f7861a6badd7b62ab6f2607e52b642918e4fff31.tar.bz2 opensim-SC-f7861a6badd7b62ab6f2607e52b642918e4fff31.tar.xz |
* Make the RegionCombinerModule also register to handle permissions for the virtual region scenes.
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs | 306 |
1 files changed, 303 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs index 0ede5c1..95efa79 100644 --- a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs | |||
@@ -495,8 +495,15 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
495 | rdata.RegionScene = scene; | 495 | rdata.RegionScene = scene; |
496 | regionConnections.RegionLandChannel = scene.LandChannel; | 496 | regionConnections.RegionLandChannel = scene.LandChannel; |
497 | 497 | ||
498 | LargeLandChannel lnd = new LargeLandChannel(rdata,scene.LandChannel,regionConnections.ConnectedRegions); | 498 | RegionCombinerLargeLandChannel lnd = new RegionCombinerLargeLandChannel(rdata,scene.LandChannel,regionConnections.ConnectedRegions); |
499 | scene.LandChannel = lnd; | 499 | scene.LandChannel = lnd; |
500 | lock (m_regions) | ||
501 | { | ||
502 | foreach (RegionData r in regionConnections.ConnectedRegions) | ||
503 | { | ||
504 | ForwardPermissionRequests(regionConnections, r.RegionScene); | ||
505 | } | ||
506 | } | ||
500 | 507 | ||
501 | m_regions.Add(scene.RegionInfo.originRegionID,regionConnections); | 508 | m_regions.Add(scene.RegionInfo.originRegionID,regionConnections); |
502 | } | 509 | } |
@@ -656,6 +663,64 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
656 | } | 663 | } |
657 | return new RegionData(); | 664 | return new RegionData(); |
658 | } | 665 | } |
666 | |||
667 | public void ForwardPermissionRequests(RegionConnections BigRegion, Scene VirtualRegion) | ||
668 | { | ||
669 | if (BigRegion.PermissionModule == null) | ||
670 | BigRegion.PermissionModule = new RegionCombinerPermissionModule(BigRegion.RegionScene); | ||
671 | |||
672 | |||
673 | |||
674 | BigRegion.RegionScene.Permissions.OnBypassPermissions += BigRegion.PermissionModule.BypassPermissions; | ||
675 | BigRegion.RegionScene.Permissions.OnSetBypassPermissions += BigRegion.PermissionModule.SetBypassPermissions; | ||
676 | BigRegion.RegionScene.Permissions.OnPropagatePermissions += BigRegion.PermissionModule.PropagatePermissions; | ||
677 | BigRegion.RegionScene.Permissions.OnGenerateClientFlags += BigRegion.PermissionModule.GenerateClientFlags; | ||
678 | BigRegion.RegionScene.Permissions.OnAbandonParcel += BigRegion.PermissionModule.CanAbandonParcel; | ||
679 | BigRegion.RegionScene.Permissions.OnReclaimParcel += BigRegion.PermissionModule.CanReclaimParcel; | ||
680 | BigRegion.RegionScene.Permissions.OnDeedParcel += BigRegion.PermissionModule.CanDeedParcel; | ||
681 | BigRegion.RegionScene.Permissions.OnDeedObject += BigRegion.PermissionModule.CanDeedObject; | ||
682 | BigRegion.RegionScene.Permissions.OnIsGod += BigRegion.PermissionModule.IsGod; | ||
683 | BigRegion.RegionScene.Permissions.OnDuplicateObject += BigRegion.PermissionModule.CanDuplicateObject; | ||
684 | BigRegion.RegionScene.Permissions.OnDeleteObject += BigRegion.PermissionModule.CanDeleteObject; //MAYBE FULLY IMPLEMENTED | ||
685 | BigRegion.RegionScene.Permissions.OnEditObject += BigRegion.PermissionModule.CanEditObject; //MAYBE FULLY IMPLEMENTED | ||
686 | BigRegion.RegionScene.Permissions.OnEditParcel += BigRegion.PermissionModule.CanEditParcel; //MAYBE FULLY IMPLEMENTED | ||
687 | BigRegion.RegionScene.Permissions.OnInstantMessage += BigRegion.PermissionModule.CanInstantMessage; | ||
688 | BigRegion.RegionScene.Permissions.OnInventoryTransfer += BigRegion.PermissionModule.CanInventoryTransfer; //NOT YET IMPLEMENTED | ||
689 | BigRegion.RegionScene.Permissions.OnIssueEstateCommand += BigRegion.PermissionModule.CanIssueEstateCommand; //FULLY IMPLEMENTED | ||
690 | BigRegion.RegionScene.Permissions.OnMoveObject += BigRegion.PermissionModule.CanMoveObject; //MAYBE FULLY IMPLEMENTED | ||
691 | BigRegion.RegionScene.Permissions.OnObjectEntry += BigRegion.PermissionModule.CanObjectEntry; | ||
692 | BigRegion.RegionScene.Permissions.OnReturnObject += BigRegion.PermissionModule.CanReturnObject; //NOT YET IMPLEMENTED | ||
693 | BigRegion.RegionScene.Permissions.OnRezObject += BigRegion.PermissionModule.CanRezObject; //MAYBE FULLY IMPLEMENTED | ||
694 | BigRegion.RegionScene.Permissions.OnRunConsoleCommand += BigRegion.PermissionModule.CanRunConsoleCommand; | ||
695 | BigRegion.RegionScene.Permissions.OnRunScript += BigRegion.PermissionModule.CanRunScript; //NOT YET IMPLEMENTED | ||
696 | BigRegion.RegionScene.Permissions.OnCompileScript += BigRegion.PermissionModule.CanCompileScript; | ||
697 | BigRegion.RegionScene.Permissions.OnSellParcel += BigRegion.PermissionModule.CanSellParcel; | ||
698 | BigRegion.RegionScene.Permissions.OnTakeObject += BigRegion.PermissionModule.CanTakeObject; | ||
699 | BigRegion.RegionScene.Permissions.OnTakeCopyObject += BigRegion.PermissionModule.CanTakeCopyObject; | ||
700 | BigRegion.RegionScene.Permissions.OnTerraformLand += BigRegion.PermissionModule.CanTerraformLand; | ||
701 | BigRegion.RegionScene.Permissions.OnLinkObject += BigRegion.PermissionModule.CanLinkObject; //NOT YET IMPLEMENTED | ||
702 | BigRegion.RegionScene.Permissions.OnDelinkObject += BigRegion.PermissionModule.CanDelinkObject; //NOT YET IMPLEMENTED | ||
703 | BigRegion.RegionScene.Permissions.OnBuyLand += BigRegion.PermissionModule.CanBuyLand; //NOT YET IMPLEMENTED | ||
704 | |||
705 | BigRegion.RegionScene.Permissions.OnViewNotecard += BigRegion.PermissionModule.CanViewNotecard; //NOT YET IMPLEMENTED | ||
706 | BigRegion.RegionScene.Permissions.OnViewScript += BigRegion.PermissionModule.CanViewScript; //NOT YET IMPLEMENTED | ||
707 | BigRegion.RegionScene.Permissions.OnEditNotecard += BigRegion.PermissionModule.CanEditNotecard; //NOT YET IMPLEMENTED | ||
708 | BigRegion.RegionScene.Permissions.OnEditScript += BigRegion.PermissionModule.CanEditScript; //NOT YET IMPLEMENTED | ||
709 | |||
710 | BigRegion.RegionScene.Permissions.OnCreateObjectInventory += BigRegion.PermissionModule.CanCreateObjectInventory; //NOT IMPLEMENTED HERE | ||
711 | BigRegion.RegionScene.Permissions.OnEditObjectInventory += BigRegion.PermissionModule.CanEditObjectInventory;//MAYBE FULLY IMPLEMENTED | ||
712 | BigRegion.RegionScene.Permissions.OnCopyObjectInventory += BigRegion.PermissionModule.CanCopyObjectInventory; //NOT YET IMPLEMENTED | ||
713 | BigRegion.RegionScene.Permissions.OnDeleteObjectInventory += BigRegion.PermissionModule.CanDeleteObjectInventory; //NOT YET IMPLEMENTED | ||
714 | BigRegion.RegionScene.Permissions.OnResetScript += BigRegion.PermissionModule.CanResetScript; | ||
715 | |||
716 | BigRegion.RegionScene.Permissions.OnCreateUserInventory += BigRegion.PermissionModule.CanCreateUserInventory; //NOT YET IMPLEMENTED | ||
717 | BigRegion.RegionScene.Permissions.OnCopyUserInventory += BigRegion.PermissionModule.CanCopyUserInventory; //NOT YET IMPLEMENTED | ||
718 | BigRegion.RegionScene.Permissions.OnEditUserInventory += BigRegion.PermissionModule.CanEditUserInventory; //NOT YET IMPLEMENTED | ||
719 | BigRegion.RegionScene.Permissions.OnDeleteUserInventory += BigRegion.PermissionModule.CanDeleteUserInventory; //NOT YET IMPLEMENTED | ||
720 | |||
721 | BigRegion.RegionScene.Permissions.OnTeleport += BigRegion.PermissionModule.CanTeleport; //NOT YET IMPLEMENTED | ||
722 | BigRegion.RegionScene.Permissions.OnUseObjectReturn += BigRegion.PermissionModule.CanUseObjectReturn; //NOT YET IMPLEMENTED | ||
723 | } | ||
659 | } | 724 | } |
660 | public class RegionConnections | 725 | public class RegionConnections |
661 | { | 726 | { |
@@ -667,6 +732,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
667 | public int XEnd; | 732 | public int XEnd; |
668 | public int YEnd; | 733 | public int YEnd; |
669 | public List<RegionData> ConnectedRegions; | 734 | public List<RegionData> ConnectedRegions; |
735 | public RegionCombinerPermissionModule PermissionModule; | ||
670 | public void UpdateExtents(Vector3 extents) | 736 | public void UpdateExtents(Vector3 extents) |
671 | { | 737 | { |
672 | XEnd = (int)extents.X; | 738 | XEnd = (int)extents.X; |
@@ -683,7 +749,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
683 | 749 | ||
684 | } | 750 | } |
685 | 751 | ||
686 | public class LargeLandChannel : ILandChannel | 752 | public class RegionCombinerLargeLandChannel : ILandChannel |
687 | { | 753 | { |
688 | // private static readonly ILog m_log = | 754 | // private static readonly ILog m_log = |
689 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 755 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -693,7 +759,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
693 | 759 | ||
694 | #region ILandChannel Members | 760 | #region ILandChannel Members |
695 | 761 | ||
696 | public LargeLandChannel(RegionData regData, ILandChannel rootRegionLandChannel,List<RegionData> regionConnections) | 762 | public RegionCombinerLargeLandChannel(RegionData regData, ILandChannel rootRegionLandChannel,List<RegionData> regionConnections) |
697 | { | 763 | { |
698 | RegData = regData; | 764 | RegData = regData; |
699 | RootRegionLandChannel = rootRegionLandChannel; | 765 | RootRegionLandChannel = rootRegionLandChannel; |
@@ -811,4 +877,238 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
811 | 877 | ||
812 | #endregion | 878 | #endregion |
813 | } | 879 | } |
880 | |||
881 | public class RegionCombinerPermissionModule | ||
882 | { | ||
883 | private Scene m_rootScene; | ||
884 | public RegionCombinerPermissionModule(Scene RootScene) | ||
885 | { | ||
886 | m_rootScene = RootScene; | ||
887 | } | ||
888 | |||
889 | public bool BypassPermissions() | ||
890 | { | ||
891 | return m_rootScene.Permissions.BypassPermissions(); | ||
892 | } | ||
893 | |||
894 | public void SetBypassPermissions(bool value) | ||
895 | { | ||
896 | m_rootScene.Permissions.SetBypassPermissions(value); | ||
897 | } | ||
898 | |||
899 | public bool PropagatePermissions() | ||
900 | { | ||
901 | return m_rootScene.Permissions.PropagatePermissions(); | ||
902 | } | ||
903 | |||
904 | public uint GenerateClientFlags(UUID userid, UUID objectidid) | ||
905 | { | ||
906 | return m_rootScene.Permissions.GenerateClientFlags(userid,objectidid); | ||
907 | } | ||
908 | |||
909 | public bool CanAbandonParcel(UUID user, ILandObject parcel, Scene scene) | ||
910 | { | ||
911 | return m_rootScene.Permissions.CanAbandonParcel(user,parcel); | ||
912 | } | ||
913 | |||
914 | public bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene) | ||
915 | { | ||
916 | return m_rootScene.Permissions.CanReclaimParcel(user, parcel); | ||
917 | } | ||
918 | |||
919 | public bool CanDeedParcel(UUID user, ILandObject parcel, Scene scene) | ||
920 | { | ||
921 | return m_rootScene.Permissions.CanDeedParcel(user, parcel); | ||
922 | } | ||
923 | |||
924 | public bool CanDeedObject(UUID user, UUID @group, Scene scene) | ||
925 | { | ||
926 | return m_rootScene.Permissions.CanDeedObject(user,@group); | ||
927 | } | ||
928 | |||
929 | public bool IsGod(UUID user, Scene requestfromscene) | ||
930 | { | ||
931 | return m_rootScene.Permissions.IsGod(user); | ||
932 | } | ||
933 | |||
934 | public bool CanDuplicateObject(int objectcount, UUID objectid, UUID owner, Scene scene, Vector3 objectposition) | ||
935 | { | ||
936 | return m_rootScene.Permissions.CanDuplicateObject(objectcount, objectid, owner, objectposition); | ||
937 | } | ||
938 | |||
939 | public bool CanDeleteObject(UUID objectid, UUID deleter, Scene scene) | ||
940 | { | ||
941 | return m_rootScene.Permissions.CanDeleteObject(objectid, deleter); | ||
942 | } | ||
943 | |||
944 | public bool CanEditObject(UUID objectid, UUID editorid, Scene scene) | ||
945 | { | ||
946 | return m_rootScene.Permissions.CanEditObject(objectid, editorid); | ||
947 | } | ||
948 | |||
949 | public bool CanEditParcel(UUID user, ILandObject parcel, Scene scene) | ||
950 | { | ||
951 | return m_rootScene.Permissions.CanEditParcel(user, parcel); | ||
952 | } | ||
953 | |||
954 | public bool CanInstantMessage(UUID user, UUID target, Scene startscene) | ||
955 | { | ||
956 | return m_rootScene.Permissions.CanInstantMessage(user, target); | ||
957 | } | ||
958 | |||
959 | public bool CanInventoryTransfer(UUID user, UUID target, Scene startscene) | ||
960 | { | ||
961 | return m_rootScene.Permissions.CanInventoryTransfer(user, target); | ||
962 | } | ||
963 | |||
964 | public bool CanIssueEstateCommand(UUID user, Scene requestfromscene, bool ownercommand) | ||
965 | { | ||
966 | return m_rootScene.Permissions.CanIssueEstateCommand(user, ownercommand); | ||
967 | } | ||
968 | |||
969 | public bool CanMoveObject(UUID objectid, UUID moverid, Scene scene) | ||
970 | { | ||
971 | return m_rootScene.Permissions.CanMoveObject(objectid, moverid); | ||
972 | } | ||
973 | |||
974 | public bool CanObjectEntry(UUID objectid, bool enteringregion, Vector3 newpoint, Scene scene) | ||
975 | { | ||
976 | return m_rootScene.Permissions.CanObjectEntry(objectid, enteringregion, newpoint); | ||
977 | } | ||
978 | |||
979 | public bool CanReturnObject(UUID objectid, UUID returnerid, Scene scene) | ||
980 | { | ||
981 | return m_rootScene.Permissions.CanReturnObject(objectid, returnerid); | ||
982 | } | ||
983 | |||
984 | public bool CanRezObject(int objectcount, UUID owner, Vector3 objectposition, Scene scene) | ||
985 | { | ||
986 | return m_rootScene.Permissions.CanRezObject(objectcount, owner, objectposition); | ||
987 | } | ||
988 | |||
989 | public bool CanRunConsoleCommand(UUID user, Scene requestfromscene) | ||
990 | { | ||
991 | return m_rootScene.Permissions.CanRunConsoleCommand(user); | ||
992 | } | ||
993 | |||
994 | public bool CanRunScript(UUID script, UUID objectid, UUID user, Scene scene) | ||
995 | { | ||
996 | return m_rootScene.Permissions.CanRunScript(script, objectid, user); | ||
997 | } | ||
998 | |||
999 | public bool CanCompileScript(UUID owneruuid, int scripttype, Scene scene) | ||
1000 | { | ||
1001 | return m_rootScene.Permissions.CanCompileScript(owneruuid, scripttype); | ||
1002 | } | ||
1003 | |||
1004 | public bool CanSellParcel(UUID user, ILandObject parcel, Scene scene) | ||
1005 | { | ||
1006 | return m_rootScene.Permissions.CanSellParcel(user, parcel); | ||
1007 | } | ||
1008 | |||
1009 | public bool CanTakeObject(UUID objectid, UUID stealer, Scene scene) | ||
1010 | { | ||
1011 | return m_rootScene.Permissions.CanTakeObject(objectid, stealer); | ||
1012 | } | ||
1013 | |||
1014 | public bool CanTakeCopyObject(UUID objectid, UUID userid, Scene inscene) | ||
1015 | { | ||
1016 | return m_rootScene.Permissions.CanTakeObject(objectid, userid); | ||
1017 | } | ||
1018 | |||
1019 | public bool CanTerraformLand(UUID user, Vector3 position, Scene requestfromscene) | ||
1020 | { | ||
1021 | return m_rootScene.Permissions.CanTerraformLand(user, position); | ||
1022 | } | ||
1023 | |||
1024 | public bool CanLinkObject(UUID user, UUID objectid) | ||
1025 | { | ||
1026 | return m_rootScene.Permissions.CanLinkObject(user, objectid); | ||
1027 | } | ||
1028 | |||
1029 | public bool CanDelinkObject(UUID user, UUID objectid) | ||
1030 | { | ||
1031 | return m_rootScene.Permissions.CanDelinkObject(user, objectid); | ||
1032 | } | ||
1033 | |||
1034 | public bool CanBuyLand(UUID user, ILandObject parcel, Scene scene) | ||
1035 | { | ||
1036 | return m_rootScene.Permissions.CanBuyLand(user, parcel); | ||
1037 | } | ||
1038 | |||
1039 | public bool CanViewNotecard(UUID script, UUID objectid, UUID user, Scene scene) | ||
1040 | { | ||
1041 | return m_rootScene.Permissions.CanViewNotecard(script, objectid, user); | ||
1042 | } | ||
1043 | |||
1044 | public bool CanViewScript(UUID script, UUID objectid, UUID user, Scene scene) | ||
1045 | { | ||
1046 | return m_rootScene.Permissions.CanViewScript(script, objectid, user); | ||
1047 | } | ||
1048 | |||
1049 | public bool CanEditNotecard(UUID notecard, UUID objectid, UUID user, Scene scene) | ||
1050 | { | ||
1051 | return m_rootScene.Permissions.CanEditNotecard(notecard, objectid, user); | ||
1052 | } | ||
1053 | |||
1054 | public bool CanEditScript(UUID script, UUID objectid, UUID user, Scene scene) | ||
1055 | { | ||
1056 | return m_rootScene.Permissions.CanEditScript(script, objectid, user); | ||
1057 | } | ||
1058 | |||
1059 | public bool CanCreateObjectInventory(int invtype, UUID objectid, UUID userid) | ||
1060 | { | ||
1061 | return m_rootScene.Permissions.CanCreateObjectInventory(invtype, objectid, userid); | ||
1062 | } | ||
1063 | |||
1064 | public bool CanEditObjectInventory(UUID objectid, UUID editorid, Scene scene) | ||
1065 | { | ||
1066 | return m_rootScene.Permissions.CanEditObjectInventory(objectid, editorid); | ||
1067 | } | ||
1068 | |||
1069 | public bool CanCopyObjectInventory(UUID itemid, UUID objectid, UUID userid) | ||
1070 | { | ||
1071 | return m_rootScene.Permissions.CanCopyObjectInventory(itemid, objectid, userid); | ||
1072 | } | ||
1073 | |||
1074 | public bool CanDeleteObjectInventory(UUID itemid, UUID objectid, UUID userid) | ||
1075 | { | ||
1076 | return m_rootScene.Permissions.CanDeleteObjectInventory(itemid, objectid, userid); | ||
1077 | } | ||
1078 | |||
1079 | public bool CanResetScript(UUID prim, UUID script, UUID user, Scene scene) | ||
1080 | { | ||
1081 | return m_rootScene.Permissions.CanResetScript(prim, script, user); | ||
1082 | } | ||
1083 | |||
1084 | public bool CanCreateUserInventory(int invtype, UUID userid) | ||
1085 | { | ||
1086 | return m_rootScene.Permissions.CanCreateUserInventory(invtype, userid); | ||
1087 | } | ||
1088 | |||
1089 | public bool CanCopyUserInventory(UUID itemid, UUID userid) | ||
1090 | { | ||
1091 | return m_rootScene.Permissions.CanCopyUserInventory(itemid, userid); | ||
1092 | } | ||
1093 | |||
1094 | public bool CanEditUserInventory(UUID itemid, UUID userid) | ||
1095 | { | ||
1096 | return m_rootScene.Permissions.CanEditUserInventory(itemid, userid); | ||
1097 | } | ||
1098 | |||
1099 | public bool CanDeleteUserInventory(UUID itemid, UUID userid) | ||
1100 | { | ||
1101 | return m_rootScene.Permissions.CanDeleteUserInventory(itemid, userid); | ||
1102 | } | ||
1103 | |||
1104 | public bool CanTeleport(UUID userid, Scene scene) | ||
1105 | { | ||
1106 | return m_rootScene.Permissions.CanTeleport(userid); | ||
1107 | } | ||
1108 | |||
1109 | public bool CanUseObjectReturn(ILandObject landdata, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene) | ||
1110 | { | ||
1111 | return m_rootScene.Permissions.CanUseObjectReturn(landdata, type, client, retlist); | ||
1112 | } | ||
1113 | } | ||
814 | } | 1114 | } |