lfalanga
8/7/2015 - 2:19 PM

IsAdmin

IsAdmin

%REM
	Function IsAdmin
	Description: Verifies that the user is assigned the role [Admin]
%END REM
Function IsAdmin() As Boolean
	
	Dim userRoles As Variant
	
	userRoles = Evaluate("@UserRoles")
	IsAdmin = False
	ForAll r In userRoles
		If (UCase(r) = "[ADMIN]") Then
			IsAdmin = True
		End If
	End ForAll
	
End Function