Ejemplo n.º 1
0
        /// <summary>
        /// Returns true if the current user has access to the page based on if the user is logged in or not.
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        public bool HasAccessToPage(string url)
        {
            if (_userAuthService.IsAuthorized())
            {
                return(true);
            }

            var relativeUrl = "/" + _navigationManager.ToBaseRelativePath(url);

            return(noAuthPages.Contains(relativeUrl));
        }