Exemple #1
0
        public bool HasAccess(SystemAccessEnum accessId)
        {
            // if (accessId == SystemAccessEnum.EditProject && this.ShowPrices == false) return false;

            if (this.SystemAccesses == null)
            {
                return(false);
            }

            bool hasaccess = SystemAccesses.Any(s => s == accessId);

            return(hasaccess);
        }
Exemple #2
0
        public bool HasAccess(SystemAccessEnum[] accesses)
        {
            if (accesses == null || accesses.Length == 0)
            {
                return(true);
            }

            if (SystemAccesses == null)
            {
                return(false);
            }

            bool hasaccess = SystemAccesses.Any(s => HasAccess(s));

            return(hasaccess);
        }