Wednesday 19 August 2020

Check whether Role is assigned to User or not.


static boolean isUserInRole(Description  _roleName)

    {

        boolean                 res;

        SecurityUserRole        securityUserRole;

        SecurityRole            securityRole;

        ;

        select RecId from securityUserRole

            where  securityUserRole.User    == curUserId()

            join RecId from securityRole

                where  securityRole.RecId == securityUserRole.SecurityRole

                    && (   securityRole.AotName == _roleName

                    )    ;

        if (securityUserRole.RecId)

        {

            res = true;

        }

    

        return res;

    }


====================================================================


   ListEnumerator              userRolesEnumerator;

 userManagement              = new SysUserManagement();

   userRoles                   = userManagement.getRolesForUser(curUserId());

   userRolesEnumerator       = userRoles.getEnumerator();

Global::IsSystemadministrator()

GLobal::FinancialController()

1 comment:

  1. Do you need Finance? Are you looking for Finance? Are you looking for finance to enlarge your business? We help individuals and companies to obtain finance for business expanding and to setup a new business ranging any amount. Get finance at affordable interest rate of 3%, Do you need this finance for business and to clear your bills? Then send us an email now for more information contact us now via (financialserviceoffer876@gmail.com) whats-App +918929509036 Dr James Eric Finance Pvt Ltd Thanks

    ReplyDelete