aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-15 03:14:48 +0000
committerTeravus Ovares2008-05-15 03:14:48 +0000
commitbc177b1c37bff12030d978f45e94227e141e6fed (patch)
tree4004f19ade62a07101402453abc747daa117e2d7 /OpenSim/Region/Environment/Modules
parent* Got rid of an old crufty sleep that was being called. Thanks for your sup... (diff)
downloadopensim-SC_OLD-bc177b1c37bff12030d978f45e94227e141e6fed.zip
opensim-SC_OLD-bc177b1c37bff12030d978f45e94227e141e6fed.tar.gz
opensim-SC_OLD-bc177b1c37bff12030d978f45e94227e141e6fed.tar.bz2
opensim-SC_OLD-bc177b1c37bff12030d978f45e94227e141e6fed.tar.xz
* Committing Patch mantis 0001275: [PATCH] Add more perms-fu. From Melanie. Thanks Melanie!
* Adds hooks in the permission module for CanReadScript, CanEditScript, CanCopyInventory, CanDeleteInventory, CanEditNotecard, CanViewNotecard, CanViewScript.. and a few more. The functionality in the default module returns true.
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs93
1 files changed, 85 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
index 76f21f7..7cf2427 100644
--- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
@@ -151,6 +151,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
151 m_scene.ExternalChecks.addCheckEditObject(CanEditObject);//MAYBE FULLY IMPLEMENTED 151 m_scene.ExternalChecks.addCheckEditObject(CanEditObject);//MAYBE FULLY IMPLEMENTED
152 m_scene.ExternalChecks.addCheckEditParcel(CanEditParcel); //FULLY IMPLEMENTED 152 m_scene.ExternalChecks.addCheckEditParcel(CanEditParcel); //FULLY IMPLEMENTED
153 m_scene.ExternalChecks.addCheckEditScript(CanEditScript); //NOT YET IMPLEMENTED 153 m_scene.ExternalChecks.addCheckEditScript(CanEditScript); //NOT YET IMPLEMENTED
154 m_scene.ExternalChecks.addCheckEditNotecard(CanEditNotecard); //NOT YET IMPLEMENTED
154 m_scene.ExternalChecks.addCheckInstantMessage(CanInstantMessage); //FULLY IMPLEMENTED 155 m_scene.ExternalChecks.addCheckInstantMessage(CanInstantMessage); //FULLY IMPLEMENTED
155 m_scene.ExternalChecks.addCheckInventoryTransfer(CanInventoryTransfer); //NOT YET IMPLEMENTED 156 m_scene.ExternalChecks.addCheckInventoryTransfer(CanInventoryTransfer); //NOT YET IMPLEMENTED
156 m_scene.ExternalChecks.addCheckIssueEstateCommand(CanIssueEstateCommand); //FULLY IMPLEMENTED 157 m_scene.ExternalChecks.addCheckIssueEstateCommand(CanIssueEstateCommand); //FULLY IMPLEMENTED
@@ -165,11 +166,14 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
165 m_scene.ExternalChecks.addCheckTakeCopyObject(CanTakeCopyObject); //FULLY IMPLEMENTED 166 m_scene.ExternalChecks.addCheckTakeCopyObject(CanTakeCopyObject); //FULLY IMPLEMENTED
166 m_scene.ExternalChecks.addCheckTerraformLand(CanTerraformLand); //FULL IMPLEMENTED (POINT ONLY!!! NOT AREA!!!) 167 m_scene.ExternalChecks.addCheckTerraformLand(CanTerraformLand); //FULL IMPLEMENTED (POINT ONLY!!! NOT AREA!!!)
167 m_scene.ExternalChecks.addCheckViewScript(CanViewScript); //NOT YET IMPLEMENTED 168 m_scene.ExternalChecks.addCheckViewScript(CanViewScript); //NOT YET IMPLEMENTED
168 169 m_scene.ExternalChecks.addCheckViewNotecard(CanViewNotecard); //NOT YET IMPLEMENTED
169 //NEEDED PERMS: 170 m_scene.ExternalChecks.addCheckCanLinkObject(CanLinkObject); //NOT YET IMPLEMENTED
170 //CanLinkObject 171 m_scene.ExternalChecks.addCheckCanDelinkObject(CanDelinkObject); //NOT YET IMPLEMENTED
171 //CanDelinkObject 172 m_scene.ExternalChecks.addCheckCanBuyLand(CanBuyLand); //NOT YET IMPLEMENTED
172 //CanBuyLand 173 m_scene.ExternalChecks.addCheckCanCopyInventory(CanCopyInventory); //NOT YET IMPLEMENTED
174 m_scene.ExternalChecks.addCheckCanDeleteInventory(CanDeleteInventory); //NOT YET IMPLEMENTED
175 m_scene.ExternalChecks.addCheckCanCreateInventory(CanCreateInventory); //NOT YET IMPLEMENTED
176 m_scene.ExternalChecks.addCheckCanTeleport(CanTeleport); //NOT YET IMPLEMENTED
173 177
174 178
175 //Register Debug Commands 179 //Register Debug Commands
@@ -568,7 +572,15 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
568 return GenericParcelPermission(user, parcel); 572 return GenericParcelPermission(user, parcel);
569 } 573 }
570 574
571 private bool CanEditScript(LLUUID script, LLUUID user, Scene scene) 575 private bool CanEditScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene)
576 {
577 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
578 if (m_bypassPermissions) return m_bypassPermissionsValue;
579
580 return true;
581 }
582
583 private bool CanEditNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene)
572 { 584 {
573 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 585 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
574 if (m_bypassPermissions) return m_bypassPermissionsValue; 586 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -771,7 +783,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
771 return IsAdministrator(user); 783 return IsAdministrator(user);
772 } 784 }
773 785
774 private bool CanRunScript(LLUUID script, LLUUID user, Scene scene) 786 private bool CanRunScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene)
775 { 787 {
776 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 788 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
777 if (m_bypassPermissions) return m_bypassPermissionsValue; 789 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -859,15 +871,80 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
859 return permission; 871 return permission;
860 } 872 }
861 873
862 private bool CanViewScript(LLUUID script, LLUUID user, Scene scene) 874 private bool CanViewScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene)
875 {
876 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
877 if (m_bypassPermissions) return m_bypassPermissionsValue;
878
879 return true;
880 }
881
882 private bool CanViewNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene)
863 { 883 {
864 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 884 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
865 if (m_bypassPermissions) return m_bypassPermissionsValue; 885 if (m_bypassPermissions) return m_bypassPermissionsValue;
866 886
867 return true; 887 return true;
868 } 888 }
889
869 #endregion 890 #endregion
870 891
892 public bool CanLinkObject(LLUUID userID, LLUUID objectID)
893 {
894 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
895 if (m_bypassPermissions) return m_bypassPermissionsValue;
896
897 return true;
898 }
899
900 public bool CanDelinkObject(LLUUID userID, LLUUID objectID)
901 {
902 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
903 if (m_bypassPermissions) return m_bypassPermissionsValue;
904
905 return true;
906 }
907
908 public bool CanBuyLand(LLUUID userID, ILandObject parcel, Scene scene)
909 {
910 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
911 if (m_bypassPermissions) return m_bypassPermissionsValue;
912
913 return true;
914 }
915
916 public bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID)
917 {
918 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
919 if (m_bypassPermissions) return m_bypassPermissionsValue;
920
921 return true;
922 }
923
924 public bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID)
925 {
926 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
927 if (m_bypassPermissions) return m_bypassPermissionsValue;
928
929 return true;
930 }
931
932 public bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID)
933 {
934 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
935 if (m_bypassPermissions) return m_bypassPermissionsValue;
936
937 return true;
938 }
939
940 public bool CanTeleport(LLUUID userID)
941 {
942 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
943 if (m_bypassPermissions) return m_bypassPermissionsValue;
944
945 return true;
946 }
947
871 948
872 } 949 }
873 950