Hi,
In PE_AffectedItemFloat, I found this:
[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:f4b854ff-9a17-4a56-a6cf-8ab991a8ace6:type=csharp&text=Aras.Server.Security.Identity%20plmIdentity%20%3D%20Aras.Server.Security.Identity.GetByName%28%22Aras%20PLM%22%29%3B%0D%0AIDisposable%20elevatedPermissionsScope%20%3D%20CCO.Permissions.GrantIdentity%28plmIdentity%29%3B%0D%0A%0D%0A...%0D%0A%0D%0A%2F%2F%20Revoke%20%27Aras%20PLM%27%20permissions%0D%0AelevatedPermissionsScope%3F.Dispose%28%29%3B%0D%0A%0D%0Areturn%20this%3B]
So, the temporary grant is revoked with the call to Dispose.
So, this should work well:
[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:c2616d20-184c-4730-8993-bbddd2cf0940:type=text&text=using%20%28CCO.Permissions.GrantIdentity%28Aras.Server.Security.Identity.GetByName%28%22My%20Identity%22%29%29%29%0D%0A%7B%0D%0A%09%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2AYOUR%20SPECIAL%20CODE%20HERE%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2F%0D%0A%7D]