예제 #1
0
        public override HtmlTag Build(ElementRequest request)
        {
            var rights = request.AccessRights();
            if (rights.Write) return null;

            // The second span won't be rendered
            return rights.Read
                ? request.Tags().DisplayFor(request)
                : new HtmlTag("span").Authorized(false);
        }
예제 #2
0
        public override HtmlTag Build(ElementRequest request)
        {
            var rights = request.AccessRights();

            if (rights.Write)
            {
                return(null);
            }

            // The second span won't be rendered
            return(rights.Read
                ? request.Tags().DisplayFor(request)
                : new HtmlTag("span").Authorized(false));
        }