Esempio n. 1
0
 public TopTab(string name, string url, int order = 0, ISecurableSection section = null)
 {
     Name             = name;
     Url              = url;
     Order            = order;
     SecurableSection = section;
 }
Esempio n. 2
0
 public TopTab(string name, string url, int order = 0, ISecurableSection section = null)
 {
     Name = name;
     Url = url;
     Order = order;
     SecurableSection = section;
 }
Esempio n. 3
0
 public Roles GetRoles(ISecurableSection section, Roles user, Roles admin)
 {
     if (section.IsAdmin())
     {
         return(admin | user);
     }
     if (section.HasAccess())
     {
         return(user);
     }
     return(Roles.None);
 }
Esempio n. 4
0
 internal virtual bool InAdminGroups(ISecurableSection settings)
 {
     return(IsAdmin || (settings != null && InGroups(settings.AdminGroups)));
 }
Esempio n. 5
0
 internal virtual bool InReadGroups(ISecurableSection settings)
 {
     return(IsViewer || (settings != null && (InGroups(settings.ViewGroups) || InAdminGroups(settings))));
 }
Esempio n. 6
0
 internal override bool InAdminGroups(ISecurableSection settings)
 {
     return(true);
 }
Esempio n. 7
0
 internal virtual bool InAdminGroups(ISecurableSection settings)
 {
     return IsAdmin || (settings != null && InGroups(settings.AdminGroups));
 }
Esempio n. 8
0
 internal virtual bool InReadGroups(ISecurableSection settings)
 {
     return IsViewer || (settings != null && (InGroups(settings.ViewGroups) || InAdminGroups(settings)));
 }
 internal override bool InReadGroups(ISecurableSection settings) { return true; }
Esempio n. 10
0
 public static bool IsAdmin(this ISecurableSection settings)
 {
     return(Current.Security.InAdminGroups(settings));
 }
Esempio n. 11
0
 public static bool HasAccess(this ISecurableSection settings)
 {
     return(Current.Security.InReadGroups(settings));
 }
Esempio n. 12
0
 public Roles GetRoles(ISecurableSection section, Roles user, Roles admin)
 {
     if (section.IsAdmin()) return admin | user;
     if (section.HasAccess()) return user;
     return Roles.None;
 }