Non-admin users can't execute AIF "Process Message Queue" job

I am by no means a developer (EDI Specialist by trade) but I am looking for some advice on a piece of code.

For our imported order files, I find that only users in the AX Admin group can actually run the AIF "Process Message Queue" job in AX without getting an "unauthorized" message.

I found the following code in the AIFGATEWAYQUEUE VALIDATEUSER method and believe that this may be the reason?

public boolean validateUser()
{
#Admin
boolean ret;
userId currentUserId;
sid currentUserSid;

currentUserId = curuserid();

// Gateway records can be inserted or modified only:
// - by members of Admin
// - the submitting user
if (AifUtil::isGroupMember(currentUserId, #AdminUserGroup))
{
ret = true;
}
else
{
currentUserSid = AifUtil::getAxUserSid(currentUserId);
ret = (currentUserSid == AifUtil::getWindowsUserSid(this.SubmittingUserId));
if (ret && (this.orig().RecId != 0))
ret = (currentUserSid == AifUtil::getWindowsUserSid(this.orig().SubmittingUserId));
}

return ret;
}

Related
Recommended