public TopTab(string name, string url, int order = 0, ISecurableSection section = null) { Name = name; Url = url; Order = order; SecurableSection = section; }
public Roles GetRoles(ISecurableSection section, Roles user, Roles admin) { if (section.IsAdmin()) { return(admin | user); } if (section.HasAccess()) { return(user); } return(Roles.None); }
internal virtual bool InAdminGroups(ISecurableSection settings) { return(IsAdmin || (settings != null && InGroups(settings.AdminGroups))); }
internal virtual bool InReadGroups(ISecurableSection settings) { return(IsViewer || (settings != null && (InGroups(settings.ViewGroups) || InAdminGroups(settings)))); }
internal override bool InAdminGroups(ISecurableSection settings) { return(true); }
internal virtual bool InAdminGroups(ISecurableSection settings) { return IsAdmin || (settings != null && InGroups(settings.AdminGroups)); }
internal virtual bool InReadGroups(ISecurableSection settings) { return IsViewer || (settings != null && (InGroups(settings.ViewGroups) || InAdminGroups(settings))); }
internal override bool InReadGroups(ISecurableSection settings) { return true; }
public static bool IsAdmin(this ISecurableSection settings) { return(Current.Security.InAdminGroups(settings)); }
public static bool HasAccess(this ISecurableSection settings) { return(Current.Security.InReadGroups(settings)); }
public Roles GetRoles(ISecurableSection section, Roles user, Roles admin) { if (section.IsAdmin()) return admin | user; if (section.HasAccess()) return user; return Roles.None; }