Thursday, March 11, 2010

Restriction for Admin Groups

When you want to restrict something to the Admin Group only, use this code:

 

#Admin

boolean canForwardDate()

{

    boolean ret;

    UserGroupList groupList;

    ;

 

    select firstfast groupList where

        groupList.groupId == #AdminUserGroup

        &&  groupList.UserId == curuserid();

 

    if (groupList)

        ret = true;

    else

        ret = false;

 

    return ret;

}

No comments:

Post a Comment