Ejemplo n.º 1
0
        static void OperationLogic_Initializing()
        {
            try
            {
                var types = Schema.Current.Tables.Keys
                            .Where(t => EntityKindCache.GetAttribute(t) == null)
                            .Select(a => "'" + a.TypeName() + "'")
                            .CommaAnd();

                if (types.HasText())
                {
                    throw new InvalidOperationException($"{0} has not EntityTypeAttribute".FormatWith(types));
                }

                var errors = (from t in Schema.Current.Tables.Keys
                              let attr = EntityKindCache.GetAttribute(t)
                                         where attr.RequiresSaveOperation && !HasExecuteNoLite(t)
                                         select attr.IsRequiresSaveOperationOverriden ?
                                         "'{0}' has '{1}' set to true, but no operation for saving has been implemented.".FormatWith(t.TypeName(), nameof(attr.RequiresSaveOperation)) :
                                         "'{0}' is 'EntityKind.{1}', but no operation for saving has been implemented.".FormatWith(t.TypeName(), attr.EntityKind)).ToList();

                if (errors.Any())
                {
                    throw new InvalidOperationException(errors.ToString("\r\n") + @"
Consider the following options:
    * Implement an operation for saving using 'save' snippet.
    * Change the EntityKind to a more appropiated one. 
    * Exceptionally, override the property EntityTypeAttribute.RequiresSaveOperation for your particular entity.");
                }
            }
            catch (Exception e) when(StartParameters.IgnoredCodeErrors != null)
            {
                StartParameters.IgnoredCodeErrors.Add(e);
            }
        }
Ejemplo n.º 2
0
        public override void Execute()
        {
            #line 4 "..\..\AuthAdmin\Views\Types.cshtml"
            Write(Html.ScriptCss("~/authAdmin/Content/AuthAdmin.css"));


            #line default
            #line hidden
            WriteLiteral("\r\n<script");

            WriteLiteral(" type=\"text/javascript\"");

            WriteLiteral(">\r\n    $(function () {\r\n        require([\"");


            #line 7 "..\..\AuthAdmin\Views\Types.cshtml"
            Write(AuthAdminClient.Module);


            #line default
            #line hidden
            WriteLiteral(@"""], function (AuthAdmin) {
            AuthAdmin.multiSelRadios($(document));
            AuthAdmin.treeView();
            $("".sf-auth-rules .sf-submodule-trigger"").click(AuthAdmin.openDialog);
            $(document).on(""click"", "".sf-auth-rules .sf-remove"", AuthAdmin.removeCondition);
            $(document).on(""click"", "".sf-auth-rules .sf-create"", function (e) {
                e.preventDefault();
                AuthAdmin.chooseConditionToAdd($(this), '");


            #line 14 "..\..\AuthAdmin\Views\Types.cshtml"
            Write(AuthMessage.AuthAdmin_ChooseACondition.NiceToString());


            #line default
            #line hidden
            WriteLiteral("\');\r\n            });\r\n        });\r\n    });\r\n</script>\r\n");


            #line 19 "..\..\AuthAdmin\Views\Types.cshtml"

            bool propertyRules  = Navigator.Manager.EntitySettings.ContainsKey(typeof(PropertyRulePack));
            bool operationRules = Navigator.Manager.EntitySettings.ContainsKey(typeof(OperationRulePack));
            bool queryRules     = Navigator.Manager.EntitySettings.ContainsKey(typeof(QueryRulePack));


            #line default
            #line hidden
            WriteLiteral("\r\n");


            #line 24 "..\..\AuthAdmin\Views\Types.cshtml"
            using (var tc = Html.TypeContext <TypeRulePack>())
            {
            #line default
            #line hidden
                WriteLiteral("    <div");

                WriteLiteral(" class=\"form-compact\"");

                WriteLiteral(">\r\n");

                WriteLiteral("        ");


            #line 27 "..\..\AuthAdmin\Views\Types.cshtml"
                Write(Html.EntityLine(tc, f => f.Role));


            #line default
            #line hidden
                WriteLiteral("\r\n");

                WriteLiteral("        ");


            #line 28 "..\..\AuthAdmin\Views\Types.cshtml"
                Write(Html.ValueLine(tc, f => f.Strategy));


            #line default
            #line hidden
                WriteLiteral("\r\n    </div>\r\n");

                WriteLiteral("    <table");

                WriteLiteral(" class=\"sf-auth-rules\"");

                WriteLiteral(">\r\n        <thead>\r\n            <tr>\r\n                <th>");


            #line 33 "..\..\AuthAdmin\Views\Types.cshtml"
                Write(typeof(TypeEntity).NiceName());


            #line default
            #line hidden
                WriteLiteral("\r\n                </th>\r\n                <th>");


            #line 35 "..\..\AuthAdmin\Views\Types.cshtml"
                Write(TypeAllowed.Create.NiceToString());


            #line default
            #line hidden
                WriteLiteral("\r\n                </th>\r\n                <th>");


            #line 37 "..\..\AuthAdmin\Views\Types.cshtml"
                Write(TypeAllowed.Modify.NiceToString());


            #line default
            #line hidden
                WriteLiteral("\r\n                </th>\r\n                <th>");


            #line 39 "..\..\AuthAdmin\Views\Types.cshtml"
                Write(TypeAllowed.Read.NiceToString());


            #line default
            #line hidden
                WriteLiteral("\r\n                </th>\r\n                <th>");


            #line 41 "..\..\AuthAdmin\Views\Types.cshtml"
                Write(TypeAllowed.None.NiceToString());


            #line default
            #line hidden
                WriteLiteral("\r\n                </th>\r\n                <th>");


            #line 43 "..\..\AuthAdmin\Views\Types.cshtml"
                Write(AuthAdminMessage.Overriden.NiceToString());


            #line default
            #line hidden
                WriteLiteral("\r\n                </th>\r\n");


            #line 45 "..\..\AuthAdmin\Views\Types.cshtml"


            #line default
            #line hidden

            #line 45 "..\..\AuthAdmin\Views\Types.cshtml"
                if (propertyRules)
                {
            #line default
            #line hidden
                    WriteLiteral("                    <th>");


            #line 47 "..\..\AuthAdmin\Views\Types.cshtml"
                    Write(typeof(PropertyRouteEntity).NiceName());


            #line default
            #line hidden
                    WriteLiteral("\r\n                    </th>\r\n");


            #line 49 "..\..\AuthAdmin\Views\Types.cshtml"
                }


            #line default
            #line hidden
                WriteLiteral("                ");


            #line 50 "..\..\AuthAdmin\Views\Types.cshtml"
                if (operationRules)
                {
            #line default
            #line hidden
                    WriteLiteral("                    <th>");


            #line 52 "..\..\AuthAdmin\Views\Types.cshtml"
                    Write(typeof(OperationSymbol).NiceName());


            #line default
            #line hidden
                    WriteLiteral("\r\n                    </th>\r\n");


            #line 54 "..\..\AuthAdmin\Views\Types.cshtml"
                }


            #line default
            #line hidden
                WriteLiteral("                ");


            #line 55 "..\..\AuthAdmin\Views\Types.cshtml"
                if (queryRules)
                {
            #line default
            #line hidden
                    WriteLiteral("                    <th>");


            #line 57 "..\..\AuthAdmin\Views\Types.cshtml"
                    Write(typeof(QueryEntity).NiceName());


            #line default
            #line hidden
                    WriteLiteral("\r\n                    </th>\r\n");


            #line 59 "..\..\AuthAdmin\Views\Types.cshtml"
                }


            #line default
            #line hidden
                WriteLiteral("            </tr>\r\n        </thead>\r\n");


            #line 62 "..\..\AuthAdmin\Views\Types.cshtml"


            #line default
            #line hidden

            #line 62 "..\..\AuthAdmin\Views\Types.cshtml"
                foreach (var iter in tc.TypeElementContext(p => p.Rules).GroupBy(a => a.Value.Resource.Namespace).OrderBy(a => a.Key).Iterate())
                {
            #line default
            #line hidden
                    WriteLiteral("            <tr>\r\n                <td");

                    WriteLiteral(" colspan=\"6\"");

                    WriteLiteral(">\r\n                    <a");

                    WriteLiteral(" class=\"sf-auth-namespace\"");

                    WriteLiteral("><span");

                    WriteAttribute("class", Tuple.Create(" class=\"", 2624), Tuple.Create("\"", 2706)
                                   , Tuple.Create(Tuple.Create("", 2632), Tuple.Create("sf-auth-tree", 2632), true)

            #line 66 "..\..\AuthAdmin\Views\Types.cshtml"
                                   , Tuple.Create(Tuple.Create(" ", 2644), Tuple.Create <System.Object, System.Int32>(iter.IsLast ? "sf-auth-expanded-last" : "sf-auth-expanded"

            #line default
            #line hidden
                                                                                                                      , 2645), false)
                                   );

                    WriteLiteral("></span>\r\n                        <img");

                    WriteAttribute("src", Tuple.Create(" src=\"", 2745), Tuple.Create("\"", 2799)

            #line 67 "..\..\AuthAdmin\Views\Types.cshtml"
                                   , Tuple.Create(Tuple.Create("", 2751), Tuple.Create <System.Object, System.Int32>(Url.Content("~/authAdmin/Images/namespace.png")

            #line default
            #line hidden
                                                                                                                     , 2751), false)
                                   );

                    WriteLiteral(" />\r\n                        <span");

                    WriteLiteral(" class=\"sf-auth-namespace-name\"");

                    WriteLiteral(">");


            #line 68 "..\..\AuthAdmin\Views\Types.cshtml"
                    Write(iter.Value.Key);


            #line default
            #line hidden
                    WriteLiteral("</span> </a>\r\n                </td>\r\n            </tr>\r\n");


            #line 71 "..\..\AuthAdmin\Views\Types.cshtml"
                    foreach (var iter2 in iter.Value.OrderBy(a => a.Value.Resource.CleanName).Iterate())
                    {
                        var item = iter2.Value;
                        var type = item.Value.Resource.ToType();
                        var attr = EntityKindCache.GetAttribute(type);


            #line default
            #line hidden
                        WriteLiteral("            <tr");

                        WriteLiteral(" class=\"sf-auth-type\"");

                        WriteLiteral(" data-ns=\"");


            #line 76 "..\..\AuthAdmin\Views\Types.cshtml"
                        Write(iter.Value.Key);


            #line default
            #line hidden
                        WriteLiteral("\"");

                        WriteLiteral(" ");


            #line 76 "..\..\AuthAdmin\Views\Types.cshtml"
                        Write(Html.Raw(item.Value.AvailableConditions.Any() ? ("data-type=\"" + item.Value.Resource.ClassName + "\"") : ""));


            #line default
            #line hidden
                        WriteLiteral(">\r\n                <td>\r\n                    <div");

                        WriteAttribute("class", Tuple.Create(" class=\"", 3438), Tuple.Create("\"", 3508)
                                       , Tuple.Create(Tuple.Create("", 3446), Tuple.Create("sf-auth-tree", 3446), true)

            #line 78 "..\..\AuthAdmin\Views\Types.cshtml"
                                       , Tuple.Create(Tuple.Create(" ", 3458), Tuple.Create <System.Object, System.Int32>(iter.IsLast ? "sf-auth-blank" : "sf-auth-line"

            #line default
            #line hidden
                                                                                                                          , 3459), false)
                                       );

                        WriteLiteral(">\r\n                    </div>\r\n                    <div");

                        WriteAttribute("class", Tuple.Create(" class=\"", 3564), Tuple.Create("\"", 3639)
                                       , Tuple.Create(Tuple.Create("", 3572), Tuple.Create("sf-auth-tree", 3572), true)

            #line 80 "..\..\AuthAdmin\Views\Types.cshtml"
                                       , Tuple.Create(Tuple.Create(" ", 3584), Tuple.Create <System.Object, System.Int32>(iter2.IsLast ? "sf-auth-leaf-last" : "sf-auth-leaf"

            #line default
            #line hidden
                                                                                                                          , 3585), false)
                                       );

                        WriteLiteral(">\r\n                    </div>\r\n");


            #line 82 "..\..\AuthAdmin\Views\Types.cshtml"


            #line default
            #line hidden

            #line 82 "..\..\AuthAdmin\Views\Types.cshtml"
                        if (!item.Value.AvailableConditions.IsNullOrEmpty())
                        {
            #line default
            #line hidden
                            WriteLiteral("                        <a");

                            WriteAttribute("title", Tuple.Create(" title=\"", 3821), Tuple.Create("\"", 3879)

            #line 85 "..\..\AuthAdmin\Views\Types.cshtml"
                                           , Tuple.Create(Tuple.Create("", 3829), Tuple.Create <System.Object, System.Int32>(AuthMessage.AuthAdmin_AddCondition.NiceToString()

            #line default
            #line hidden
                                                                                                                             , 3829), false)
                                           );

                            WriteLiteral(" class=\"sf-line-button sf-create sf-auth-condition-button\"");

                            WriteAttribute("style", Tuple.Create(" \r\n                            style=\"", 3938), Tuple.Create("\"", 4076)

            #line 86 "..\..\AuthAdmin\Views\Types.cshtml"
                                           , Tuple.Create(Tuple.Create("", 3976), Tuple.Create <System.Object, System.Int32>(item.Value.Allowed.Conditions.Count == item.Value.AvailableConditions.Count ? "display:none" : ""

            #line default
            #line hidden
                                                                                                                             , 3976), false)
                                           );

                            WriteLiteral(">\r\n                            <span");

                            WriteLiteral(" class=\"glyphicon glyphicon-plus\"");

                            WriteLiteral("></span></a>\r\n");


            #line 88 "..\..\AuthAdmin\Views\Types.cshtml"



            #line default
            #line hidden
                            WriteLiteral("                        <input");

                            WriteLiteral(" type=\"hidden\"");

                            WriteLiteral(" disabled=\"disabled\"");

                            WriteLiteral(" class=\"sf-auth-available-conditions\"");

                            WriteAttribute("value", Tuple.Create(" value=\"", 4287), Tuple.Create("\"", 4395)

            #line 89 "..\..\AuthAdmin\Views\Types.cshtml"
                                           , Tuple.Create(Tuple.Create("", 4295), Tuple.Create <System.Object, System.Int32>(item.Value.AvailableConditions.ToString(ac => "{0}|{1}".FormatWith(ac.Key, ac.NiceToString()), ",")

            #line default
            #line hidden
                                                                                                                             , 4295), false)
                                           );

                            WriteLiteral(" />\r\n");


            #line 90 "..\..\AuthAdmin\Views\Types.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("                    <span");

                        WriteLiteral(" class=\"sf-auth-label\"");

                        WriteLiteral(">");


            #line 91 "..\..\AuthAdmin\Views\Types.cshtml"
                        Write(type.NiceName());


            #line default
            #line hidden
                        WriteLiteral("</span> <small>");


            #line 91 "..\..\AuthAdmin\Views\Types.cshtml"
                        Write(attr.EntityKind);


            #line default
            #line hidden
                        WriteLiteral("/");


            #line 91 "..\..\AuthAdmin\Views\Types.cshtml"
                        Write(attr.EntityData);


            #line default
            #line hidden
                        WriteLiteral("</small>\r\n");

                        WriteLiteral("                    ");


            #line 92 "..\..\AuthAdmin\Views\Types.cshtml"
                        Write(Html.HiddenRuntimeInfo(item, i => i.Resource));


            #line default
            #line hidden
                        WriteLiteral("\r\n");

                        WriteLiteral("                    ");


            #line 93 "..\..\AuthAdmin\Views\Types.cshtml"
                        Write(Html.Hidden(item.Compose("AllowedBase"), (item.Value.AllowedBase.Fallback?.ToStringParts() ?? "Error") + (item.Value.AllowedBase.Conditions.IsEmpty() ? "" : (";" + item.Value.AllowedBase.Conditions.ToString(a => "{0}-{1}".FormatWith(a.TypeCondition.Key, a.Allowed.ToStringParts()), ";")))));


            #line default
            #line hidden
                        WriteLiteral("\r\n                </td>\r\n");


            #line 95 "..\..\AuthAdmin\Views\Types.cshtml"


            #line default
            #line hidden

            #line 95 "..\..\AuthAdmin\Views\Types.cshtml"
                        using (var fallback = item.SubContext(a => a.Allowed.Fallback))
                        {
            #line default
            #line hidden
                            WriteLiteral("                    <td>\r\n                        <a");

                            WriteLiteral(" class=\"sf-auth-chooser sf-auth-create\"");

                            WriteLiteral(">\r\n");

                            WriteLiteral("                            ");


            #line 99 "..\..\AuthAdmin\Views\Types.cshtml"
                            Write(Html.CheckBox(fallback.Compose("Create"), fallback.Value.HasValue && fallback.Value.Value.IsActive(TypeAllowedBasic.Create), new Dictionary <string, object> {
                                { "data-tag", "Create" }
                            }));


            #line default
            #line hidden
                            WriteLiteral("\r\n                        </a>\r\n                    </td>\r\n");

                            WriteLiteral("                    <td>\r\n                        <a");

                            WriteLiteral(" class=\"sf-auth-chooser sf-auth-modify\"");

                            WriteLiteral(">\r\n");

                            WriteLiteral("                            ");


            #line 104 "..\..\AuthAdmin\Views\Types.cshtml"
                            Write(Html.CheckBox(fallback.Compose("Modify"), fallback.Value.HasValue && fallback.Value.Value.IsActive(TypeAllowedBasic.Modify), new Dictionary <string, object> {
                                { "data-tag", "Modify" }
                            }));


            #line default
            #line hidden
                            WriteLiteral("\r\n                        </a>\r\n                    </td>\r\n");

                            WriteLiteral("                    <td>\r\n                        <a");

                            WriteLiteral(" class=\"sf-auth-chooser sf-auth-read\"");

                            WriteLiteral(">\r\n");

                            WriteLiteral("                            ");


            #line 109 "..\..\AuthAdmin\Views\Types.cshtml"
                            Write(Html.CheckBox(fallback.Compose("Read"), fallback.Value.HasValue && fallback.Value.Value.IsActive(TypeAllowedBasic.Read), new Dictionary <string, object> {
                                { "data-tag", "Read" }
                            }));


            #line default
            #line hidden
                            WriteLiteral("\r\n                        </a>\r\n                    </td>\r\n");

                            WriteLiteral("                    <td>\r\n                        <a");

                            WriteLiteral(" class=\"sf-auth-chooser sf-auth-none\"");

                            WriteLiteral(">\r\n");

                            WriteLiteral("                            ");


            #line 114 "..\..\AuthAdmin\Views\Types.cshtml"
                            Write(Html.CheckBox(fallback.Compose("None"), fallback.Value.HasValue && fallback.Value.Value.IsActive(TypeAllowedBasic.None), new Dictionary <string, object> {
                                { "data-tag", "None" }
                            }));


            #line default
            #line hidden
                            WriteLiteral("\r\n                        </a>\r\n                    </td>\r\n");


            #line 117 "..\..\AuthAdmin\Views\Types.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("                <td");

                        WriteLiteral(" class=\"sf-auth-type-only\"");

                        WriteLiteral(">\r\n");

                        WriteLiteral("                    ");


            #line 119 "..\..\AuthAdmin\Views\Types.cshtml"
                        Write(Html.CheckBox(item.Compose("Overriden"), item.Value.Overriden, new { disabled = "disabled", @class = "sf-auth-overriden" }));


            #line default
            #line hidden
                        WriteLiteral("\r\n                </td>\r\n");


            #line 121 "..\..\AuthAdmin\Views\Types.cshtml"


            #line default
            #line hidden

            #line 121 "..\..\AuthAdmin\Views\Types.cshtml"
                        if (propertyRules)
                        {
            #line default
            #line hidden
                            WriteLiteral("                    <td");

                            WriteLiteral(" class=\"sf-auth-type-only\"");

                            WriteLiteral(">\r\n");


            #line 124 "..\..\AuthAdmin\Views\Types.cshtml"


            #line default
            #line hidden

            #line 124 "..\..\AuthAdmin\Views\Types.cshtml"
                            if (item.Value.Properties.HasValue)
                            {
            #line default
            #line hidden
                                WriteLiteral("                            <div");

                                WriteLiteral(" class=\"sf-auth-property\"");

                                WriteLiteral(">\r\n                                <a");

                                WriteLiteral(" class=\"sf-submodule-trigger\"");

                                WriteAttribute("href", Tuple.Create(" href=\"", 7058), Tuple.Create("\"", 7162)

            #line 127 "..\..\AuthAdmin\Views\Types.cshtml"
                                               , Tuple.Create(Tuple.Create("", 7065), Tuple.Create <System.Object, System.Int32>(Url.Action((AuthAdminController a) => a.Properties(tc.Value.Role, item.Value.Resource.ToLite()))

            #line default
            #line hidden
                                                                                                                                 , 7065), false)
                                               );

                                WriteLiteral(">\r\n                                    <span");

                                WriteAttribute("class", Tuple.Create(" class=\"", 7207), Tuple.Create("\"", 7280)
                                               , Tuple.Create(Tuple.Create("", 7215), Tuple.Create("sf-auth-thumb", 7215), true)
                                               , Tuple.Create(Tuple.Create(" ", 7228), Tuple.Create("sf-auth-", 7229), true)

            #line 128 "..\..\AuthAdmin\Views\Types.cshtml"
                                               , Tuple.Create(Tuple.Create("", 7237), Tuple.Create <System.Object, System.Int32>(item.Value.Properties.ToString().ToLower()

            #line default
            #line hidden
                                                                                                                                 , 7237), false)
                                               );

                                WriteLiteral("></span></a>\r\n                            </div>\r\n");


            #line 130 "..\..\AuthAdmin\Views\Types.cshtml"
                            }


            #line default
            #line hidden
                            WriteLiteral("                    </td>\r\n");


            #line 132 "..\..\AuthAdmin\Views\Types.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("                ");


            #line 133 "..\..\AuthAdmin\Views\Types.cshtml"
                        if (operationRules)
                        {
            #line default
            #line hidden
                            WriteLiteral("                    <td");

                            WriteLiteral(" class=\"sf-auth-type-only\"");

                            WriteLiteral(">\r\n");


            #line 136 "..\..\AuthAdmin\Views\Types.cshtml"


            #line default
            #line hidden

            #line 136 "..\..\AuthAdmin\Views\Types.cshtml"
                            if (item.Value.Operations.HasValue)
                            {
            #line default
            #line hidden
                                WriteLiteral("                            <div");

                                WriteLiteral(" class=\"sf-auth-operation\"");

                                WriteLiteral(">\r\n                                <a");

                                WriteLiteral(" class=\"sf-submodule-trigger\"");

                                WriteAttribute("href", Tuple.Create(" href=\"", 7726), Tuple.Create("\"", 7830)

            #line 139 "..\..\AuthAdmin\Views\Types.cshtml"
                                               , Tuple.Create(Tuple.Create("", 7733), Tuple.Create <System.Object, System.Int32>(Url.Action((AuthAdminController a) => a.Operations(tc.Value.Role, item.Value.Resource.ToLite()))

            #line default
            #line hidden
                                                                                                                                 , 7733), false)
                                               );

                                WriteLiteral(">\r\n                                    <span");

                                WriteAttribute("class", Tuple.Create(" class=\"", 7875), Tuple.Create("\"", 7948)
                                               , Tuple.Create(Tuple.Create("", 7883), Tuple.Create("sf-auth-thumb", 7883), true)
                                               , Tuple.Create(Tuple.Create(" ", 7896), Tuple.Create("sf-auth-", 7897), true)

            #line 140 "..\..\AuthAdmin\Views\Types.cshtml"
                                               , Tuple.Create(Tuple.Create("", 7905), Tuple.Create <System.Object, System.Int32>(item.Value.Operations.ToString().ToLower()

            #line default
            #line hidden
                                                                                                                                 , 7905), false)
                                               );

                                WriteLiteral("></span></a>\r\n                            </div>\r\n");


            #line 142 "..\..\AuthAdmin\Views\Types.cshtml"
                            }


            #line default
            #line hidden
                            WriteLiteral("                    </td>\r\n");


            #line 144 "..\..\AuthAdmin\Views\Types.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("                ");


            #line 145 "..\..\AuthAdmin\Views\Types.cshtml"
                        if (queryRules)
                        {
            #line default
            #line hidden
                            WriteLiteral("                    <td");

                            WriteLiteral(" class=\"sf-auth-type-only\"");

                            WriteLiteral(">\r\n");


            #line 148 "..\..\AuthAdmin\Views\Types.cshtml"


            #line default
            #line hidden

            #line 148 "..\..\AuthAdmin\Views\Types.cshtml"
                            if (item.Value.Queries.HasValue)
                            {
            #line default
            #line hidden
                                WriteLiteral("                            <div");

                                WriteLiteral(" class=\"sf-auth-query\"");

                                WriteLiteral(">\r\n                                <a");

                                WriteLiteral(" class=\"sf-submodule-trigger\"");

                                WriteAttribute("href", Tuple.Create(" href=\"", 8383), Tuple.Create("\"", 8484)

            #line 151 "..\..\AuthAdmin\Views\Types.cshtml"
                                               , Tuple.Create(Tuple.Create("", 8390), Tuple.Create <System.Object, System.Int32>(Url.Action((AuthAdminController a) => a.Queries(tc.Value.Role, item.Value.Resource.ToLite()))

            #line default
            #line hidden
                                                                                                                                 , 8390), false)
                                               );

                                WriteLiteral(">\r\n                                    <span");

                                WriteAttribute("class", Tuple.Create(" class=\"", 8529), Tuple.Create("\"", 8599)
                                               , Tuple.Create(Tuple.Create("", 8537), Tuple.Create("sf-auth-thumb", 8537), true)
                                               , Tuple.Create(Tuple.Create(" ", 8550), Tuple.Create("sf-auth-", 8551), true)

            #line 152 "..\..\AuthAdmin\Views\Types.cshtml"
                                               , Tuple.Create(Tuple.Create("", 8559), Tuple.Create <System.Object, System.Int32>(item.Value.Queries.ToString().ToLower()

            #line default
            #line hidden
                                                                                                                                 , 8559), false)
                                               );

                                WriteLiteral("></span>\r\n                                </a>\r\n                            </div" +
                                             ">\r\n");


            #line 155 "..\..\AuthAdmin\Views\Types.cshtml"
                            }


            #line default
            #line hidden
                            WriteLiteral("                    </td>\r\n");


            #line 157 "..\..\AuthAdmin\Views\Types.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("            </tr>\r\n");


            #line 159 "..\..\AuthAdmin\Views\Types.cshtml"
                        var conditions = item.Compose("Allowed", "Conditions");

                        foreach (var conditionIter in item.Value.Allowed.Conditions.Select((c, i) => new { Condition = c, Index = i, Prefix = TypeContextUtilities.Compose(conditions, i.ToString()) }).Iterate())
                        {
                            var condition = conditionIter.Value.Condition;
                            var prefix    = conditionIter.Value.Prefix;



            #line default
            #line hidden
                            WriteLiteral("            <tr");

                            WriteLiteral(" class=\"sf-auth-condition\"");

                            WriteLiteral(" data-ns=\"");


            #line 166 "..\..\AuthAdmin\Views\Types.cshtml"
                            Write(iter.Value.Key);


            #line default
            #line hidden
                            WriteLiteral("\"");

                            WriteLiteral(" data-type=\"");


            #line 166 "..\..\AuthAdmin\Views\Types.cshtml"
                            Write(item.Value.Resource.ClassName);


            #line default
            #line hidden
                            WriteLiteral("\"");

                            WriteLiteral(" data-condition=\"");


            #line 166 "..\..\AuthAdmin\Views\Types.cshtml"
                            Write(condition.TypeCondition.Key);


            #line default
            #line hidden
                            WriteLiteral("\"");

                            WriteLiteral(" data-index=\"");


            #line 166 "..\..\AuthAdmin\Views\Types.cshtml"
                            Write(conditionIter.Value.Index);


            #line default
            #line hidden
                            WriteLiteral("\"");

                            WriteLiteral(">\r\n                <td>\r\n                    <div");

                            WriteAttribute("class", Tuple.Create(" class=\"", 9475), Tuple.Create("\"", 9545)
                                           , Tuple.Create(Tuple.Create("", 9483), Tuple.Create("sf-auth-tree", 9483), true)

            #line 168 "..\..\AuthAdmin\Views\Types.cshtml"
                                           , Tuple.Create(Tuple.Create(" ", 9495), Tuple.Create <System.Object, System.Int32>(iter.IsLast ? "sf-auth-blank" : "sf-auth-line"

            #line default
            #line hidden
                                                                                                                              , 9496), false)
                                           );

                            WriteLiteral(">\r\n                    </div>\r\n                    <div");

                            WriteAttribute("class", Tuple.Create(" class=\"", 9601), Tuple.Create("\"", 9672)
                                           , Tuple.Create(Tuple.Create("", 9609), Tuple.Create("sf-auth-tree", 9609), true)

            #line 170 "..\..\AuthAdmin\Views\Types.cshtml"
                                           , Tuple.Create(Tuple.Create(" ", 9621), Tuple.Create <System.Object, System.Int32>(iter2.IsLast ? "sf-auth-blank" : "sf-auth-line"

            #line default
            #line hidden
                                                                                                                              , 9622), false)
                                           );

                            WriteLiteral(">\r\n                    </div>\r\n                    <div");

                            WriteAttribute("class", Tuple.Create(" class=\"", 9728), Tuple.Create("\"", 9811)
                                           , Tuple.Create(Tuple.Create("", 9736), Tuple.Create("sf-auth-tree", 9736), true)

            #line 172 "..\..\AuthAdmin\Views\Types.cshtml"
                                           , Tuple.Create(Tuple.Create(" ", 9748), Tuple.Create <System.Object, System.Int32>(conditionIter.IsLast ? "sf-auth-leaf-last" : "sf-auth-leaf"

            #line default
            #line hidden
                                                                                                                              , 9749), false)
                                           );

                            WriteLiteral(">\r\n                    </div>\r\n                    <a");

                            WriteLiteral(" class=\"sf-line-button sf-remove sf-auth-condition-button\"");

                            WriteAttribute("title", Tuple.Create(" title=\"", 9923), Tuple.Create("\"", 9986)

            #line 174 "..\..\AuthAdmin\Views\Types.cshtml"
                                           , Tuple.Create(Tuple.Create("", 9931), Tuple.Create <System.Object, System.Int32>(AuthMessage.AuthAdmin_RemoveCondition.NiceToString()

            #line default
            #line hidden
                                                                                                                             , 9931), false)
                                           );

                            WriteLiteral(">\r\n                        <span");

                            WriteLiteral(" class=\"glyphicon glyphicon-remove\"");

                            WriteLiteral("></span></a>\r\n                    <span");

                            WriteLiteral(" class=\"sf-auth-label\"");

                            WriteLiteral(">");


            #line 176 "..\..\AuthAdmin\Views\Types.cshtml"
                            Write(condition.TypeCondition.NiceToString());


            #line default
            #line hidden
                            WriteLiteral("</span>\r\n");

                            WriteLiteral("                    ");


            #line 177 "..\..\AuthAdmin\Views\Types.cshtml"
                            Write(Html.Hidden(TypeContextUtilities.Compose(prefix, "ConditionName"), condition.TypeCondition.Key));


            #line default
            #line hidden
                            WriteLiteral("\r\n                </td>\r\n\r\n");


            #line 180 "..\..\AuthAdmin\Views\Types.cshtml"


            #line default
            #line hidden

            #line 180 "..\..\AuthAdmin\Views\Types.cshtml"
                            var allowed = TypeContextUtilities.Compose(prefix, "Allowed");

            #line default
            #line hidden
                            WriteLiteral("\r\n\r\n                <td>\r\n                    <a");

                            WriteLiteral(" class=\"sf-auth-chooser sf-auth-create\"");

                            WriteLiteral(">\r\n");

                            WriteLiteral("                        ");


            #line 184 "..\..\AuthAdmin\Views\Types.cshtml"
                            Write(Html.CheckBox(TypeContextUtilities.Compose(allowed, "Create"), condition.Allowed.IsActive(TypeAllowedBasic.Create), new Dictionary <string, object> {
                                { "data-tag", "Create" }
                            }));


            #line default
            #line hidden
                            WriteLiteral("\r\n                    </a>\r\n                </td>\r\n                <td>\r\n        " +
                                         "            <a");

                            WriteLiteral(" class=\"sf-auth-chooser sf-auth-modify\"");

                            WriteLiteral(">\r\n");

                            WriteLiteral("                        ");


            #line 189 "..\..\AuthAdmin\Views\Types.cshtml"
                            Write(Html.CheckBox(TypeContextUtilities.Compose(allowed, "Modify"), condition.Allowed.IsActive(TypeAllowedBasic.Modify), new Dictionary <string, object> {
                                { "data-tag", "Modify" }
                            }));


            #line default
            #line hidden
                            WriteLiteral("\r\n                    </a>\r\n                </td>\r\n                <td>\r\n        " +
                                         "            <a");

                            WriteLiteral(" class=\"sf-auth-chooser sf-auth-read\"");

                            WriteLiteral(">\r\n");

                            WriteLiteral("                        ");


            #line 194 "..\..\AuthAdmin\Views\Types.cshtml"
                            Write(Html.CheckBox(TypeContextUtilities.Compose(allowed, "Read"), condition.Allowed.IsActive(TypeAllowedBasic.Read), new Dictionary <string, object> {
                                { "data-tag", "Read" }
                            }));


            #line default
            #line hidden
                            WriteLiteral("\r\n                    </a>\r\n                </td>\r\n                <td>\r\n        " +
                                         "            <a");

                            WriteLiteral(" class=\"sf-auth-chooser sf-auth-none\"");

                            WriteLiteral(">\r\n");

                            WriteLiteral("                        ");


            #line 199 "..\..\AuthAdmin\Views\Types.cshtml"
                            Write(Html.CheckBox(TypeContextUtilities.Compose(allowed, "None"), condition.Allowed.IsActive(TypeAllowedBasic.None), new Dictionary <string, object> {
                                { "data-tag", "None" }
                            }));


            #line default
            #line hidden
                            WriteLiteral("\r\n                    </a>\r\n                </td>\r\n\r\n                <td");

                            WriteAttribute("colspan", Tuple.Create(" colspan=\"", 11749), Tuple.Create("\"", 11839)

            #line 203 "..\..\AuthAdmin\Views\Types.cshtml"
                                           , Tuple.Create(Tuple.Create("", 11759), Tuple.Create <System.Object, System.Int32>(1 + (propertyRules ? 1 : 0) + (operationRules ? 1 : 0) + (queryRules ? 1 : 0)

            #line default
            #line hidden
                                                                                                                              , 11759), false)
                                           );

                            WriteLiteral("></td>\r\n            </tr>\r\n");


            #line 205 "..\..\AuthAdmin\Views\Types.cshtml"
                        }
                    }
                }


            #line default
            #line hidden
                WriteLiteral("    </table>\r\n");


            #line 209 "..\..\AuthAdmin\Views\Types.cshtml"
            }


            #line default
            #line hidden
        }