<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.smt-x.com/index.php?action=history&amp;feed=atom&amp;title=Check_if_a_user_has_a_certain_Role</id>
	<title>Check if a user has a certain Role - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.smt-x.com/index.php?action=history&amp;feed=atom&amp;title=Check_if_a_user_has_a_certain_Role"/>
	<link rel="alternate" type="text/html" href="https://wiki.smt-x.com/index.php?title=Check_if_a_user_has_a_certain_Role&amp;action=history"/>
	<updated>2026-04-03T22:56:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.3</generator>
	<entry>
		<id>https://wiki.smt-x.com/index.php?title=Check_if_a_user_has_a_certain_Role&amp;diff=1089&amp;oldid=prev</id>
		<title>Smtxwiki: Created page with &quot;Via a webservice, you can check if the logged in user has a certain role. You need the webservice called &#039;Logged in person has role&#039; (DEV: https://dev.ssp7.smt-x.com/Common/Admin/WsCallAddEdit.aspx?genericid=495)  var rolename = g_fieldvalues.filter(function (fld) { return fld.name === &quot;RoleName&quot;; }).map(function (fld) { return fld.value; }).join(&quot;&quot;); return StudioInterface.loggedInPersonHasRole(rolename);   You can then use this Webservice in a form, with a hidden field...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.smt-x.com/index.php?title=Check_if_a_user_has_a_certain_Role&amp;diff=1089&amp;oldid=prev"/>
		<updated>2025-11-12T14:21:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Via a webservice, you can check if the logged in user has a certain role. You need the webservice called &amp;#039;Logged in person has role&amp;#039; (DEV: https://dev.ssp7.smt-x.com/Common/Admin/WsCallAddEdit.aspx?genericid=495)  var rolename = g_fieldvalues.filter(function (fld) { return fld.name === &amp;quot;RoleName&amp;quot;; }).map(function (fld) { return fld.value; }).join(&amp;quot;&amp;quot;); return StudioInterface.loggedInPersonHasRole(rolename);   You can then use this Webservice in a form, with a hidden field...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Via a webservice, you can check if the logged in user has a certain role. You need the webservice called &amp;#039;Logged in person has role&amp;#039; (DEV: https://dev.ssp7.smt-x.com/Common/Admin/WsCallAddEdit.aspx?genericid=495)&lt;br /&gt;
&lt;br /&gt;
var rolename = g_fieldvalues.filter(function (fld) { return fld.name === &amp;quot;RoleName&amp;quot;; }).map(function (fld) { return fld.value; }).join(&amp;quot;&amp;quot;);&lt;br /&gt;
return StudioInterface.loggedInPersonHasRole(rolename);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can then use this Webservice in a form, with a hidden field.&lt;br /&gt;
&lt;br /&gt;
In the example below, we check if the user has the role &amp;#039;EC&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
WebserviceLookup(&amp;#039;Logged in person has role&amp;#039;, &amp;#039;&amp;#039;, &amp;#039;RoleName&amp;#039;, &amp;#039;EC&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
This will return &amp;#039;true&amp;#039; or &amp;#039;false&amp;#039;.&lt;/div&gt;</summary>
		<author><name>Smtxwiki</name></author>
	</entry>
</feed>