<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to use GrantIdentity ?</title><link>https://www.aras.com/community/f/development/37695/how-to-use-grantidentity</link><description>Hi, 
 On ARAS R12, in server methods, I needed to grant temporary some rights. For that, I did something like this: 
 
 Due to deprecated API, on ARAS R19, I need to use CCO.Permissions.GrantIdentity but this method doesn&amp;#39;t return a boolean to know if</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to use GrantIdentity ?</title><link>https://www.aras.com/community/thread/8996?ContentTypeID=1</link><pubDate>Tue, 22 Nov 2022 10:25:56 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:6f04571f-84b6-4a55-82f4-5ffd24d7eba8</guid><dc:creator>miraks</dc:creator><description>&lt;p&gt;I don&amp;#39;t know. I didn&amp;#39;t find it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use GrantIdentity ?</title><link>https://www.aras.com/community/thread/8995?ContentTypeID=1</link><pubDate>Tue, 22 Nov 2022 10:24:42 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b3c6c0da-b8c5-4651-adc3-5f638d9e4760</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Your &amp;quot;using&amp;quot; variant sounds right for me! I already fear the amount of Methods I have to update manually once there is a new open release.&lt;span class="emoticon" data-url="https://www.aras.com/community/cfs-file/__key/system/emoji/1f62c.svg" title="Grimacing"&gt;&amp;#x1f62c;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Is there somewhere an overview of the code impact due to&amp;nbsp;.NET Core changes?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use GrantIdentity ?</title><link>https://www.aras.com/community/thread/8991?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 11:00:04 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:50d60ab9-b749-4428-9ee8-3fe6711f9b9c</guid><dc:creator>miraks</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;In&amp;nbsp;&lt;span&gt;PE_AffectedItemFloat, I found this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;Aras.Server.Security.Identity plmIdentity = Aras.Server.Security.Identity.GetByName(&amp;quot;Aras PLM&amp;quot;);
IDisposable elevatedPermissionsScope = CCO.Permissions.GrantIdentity(plmIdentity);

...

// Revoke &amp;#39;Aras PLM&amp;#39; permissions
elevatedPermissionsScope?.Dispose();

return this;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So, the temporary grant is revoked with the call to Dispose.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So, this should work well:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;using (CCO.Permissions.GrantIdentity(Aras.Server.Security.Identity.GetByName(&amp;quot;My Identity&amp;quot;)))
{
	/**************YOUR SPECIAL CODE HERE***************/
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use GrantIdentity ?</title><link>https://www.aras.com/community/thread/8990?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 10:11:22 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:cc796da0-40f0-4b3f-9525-5c4d9f570677</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;I don&amp;acute;t use R19, but I am highly interested in this topic!&lt;/p&gt;
&lt;p&gt;How does Aras solve this one in the Method &amp;quot;PE_AffectedItemFloat&amp;quot; or &amp;quot;PE_ChangeItemTransition&amp;quot;? New variant should be visible in the beginning in the code if they don&amp;acute;t have changed the code completely.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>