Example #1
0
        internal static bool HasPermission(FunctionalityEnum funcEnum, bool checkLicenseAlso)
        {
            //return true;
            bool returnValue = false;

            //if (CurrentBitplateUser.GetSuperUserType() == SuperUserTypeEnum.Developers)
            //{
            //    return true;
            //}
            //in sommige gevallen is er geen licentie, maar moet dashboard & siteconfig wel beschikbaar zijn,
            //namelijk om de licentiecode te zetten.
            //dan kan er dus geen check zijn op licentie (deze check zit wel in alle subpagina's)
            if (checkLicenseAlso)
            {
                if (CurrentLicense != null && CurrentBitplateUser != null)
                {
                    returnValue = (CurrentLicense.HasPermission(funcEnum) &&
                                   CurrentBitplateUser.HasPermission(funcEnum));
                }
            }
            else
            {
                returnValue = CurrentBitplateUser.HasPermission(funcEnum);
            }
            return(returnValue);
            //return true;
        }