Example #1
0
        public static bool HasClientAccess(string clientName, MenuAccessCode accessCode)
        {
            appClient = AppClient.GetClient(clientName);

            if (appClient.hasAccess(accessCode))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        public static AppClientApbstract GetClient(string clientName)
        {
            switch (clientName)
            {
            case "ElectroluxPLV": appClient = new AppClientElectroluxPLV(); break;

            case "PackingLabel": appClient = new AppClientElectroluxPLV(); break;

            case "Dev": appClient = new AppClientDev(); break;

            case "DevK": appClient = new AppClientDev(); break;

            case "DevP": appClient = new AppClientDev(); break;

            case "DevM": appClient = new AppClientDev(); break;

            default: appClient = new AppClientUnknown(); break;
            }

            return(appClient);
        }
Example #3
0
 public static bool CheckAccess(IMenuItem menuItem, AppClientApbstract appClient1, IPrincipal user)
 {
     return(appClient1.hasAccess((MenuAccessCode)menuItem.AccessCode) &&
            HasUserAccess(user, menuItem.RequiredRole));
 }
Example #4
0
 public static bool CheckAccess(IMenuItem menuItem, AppClientApbstract appClient1)
 {
     return(appClient1.hasAccess((MenuAccessCode)menuItem.AccessCode));
 }