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); }
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)); }