aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins
diff options
context:
space:
mode:
authorOren Hurvitz2013-11-05 15:42:23 +0200
committerJustin Clark-Casey (justincc)2014-01-10 19:50:03 +0000
commit91fd9c467083a57e2898594ce3ae764aa0525bb5 (patch)
tree32078bfcfec717530d29f18d8b2afb6b41cfbab3 /OpenSim/ApplicationPlugins
parentRefactored setting permissions when rezzing items: use the same function when... (diff)
downloadopensim-SC_OLD-91fd9c467083a57e2898594ce3ae764aa0525bb5.zip
opensim-SC_OLD-91fd9c467083a57e2898594ce3ae764aa0525bb5.tar.gz
opensim-SC_OLD-91fd9c467083a57e2898594ce3ae764aa0525bb5.tar.bz2
opensim-SC_OLD-91fd9c467083a57e2898594ce3ae764aa0525bb5.tar.xz
Refactored: use a single function to apply an object's folded permissions to its main permissions
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 354f587..811781c 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -2763,15 +2763,13 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2763 /// </summary> 2763 /// </summary>
2764 private void ApplyNextOwnerPermissions(InventoryItemBase item) 2764 private void ApplyNextOwnerPermissions(InventoryItemBase item)
2765 { 2765 {
2766 if (item.InvType == (int)InventoryType.Object && (item.CurrentPermissions & 7) != 0) 2766 if (item.InvType == (int)InventoryType.Object)
2767 { 2767 {
2768 if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0) 2768 uint perms = item.CurrentPermissions;
2769 item.CurrentPermissions &= ~(uint)PermissionMask.Copy; 2769 PermissionsUtil.ApplyFoldedPermissions(item.CurrentPermissions, ref perms);
2770 if ((item.CurrentPermissions & ((uint)PermissionMask.Transfer >> 13)) == 0) 2770 item.CurrentPermissions = perms;
2771 item.CurrentPermissions &= ~(uint)PermissionMask.Transfer;
2772 if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0)
2773 item.CurrentPermissions &= ~(uint)PermissionMask.Modify;
2774 } 2771 }
2772
2775 item.CurrentPermissions &= item.NextPermissions; 2773 item.CurrentPermissions &= item.NextPermissions;
2776 item.BasePermissions &= item.NextPermissions; 2774 item.BasePermissions &= item.NextPermissions;
2777 item.EveryOnePermissions &= item.NextPermissions; 2775 item.EveryOnePermissions &= item.NextPermissions;