diff --git a/NWAPIPermissionSystem/PermissionHandler.cs b/NWAPIPermissionSystem/PermissionHandler.cs index 42371ad..a80821f 100644 --- a/NWAPIPermissionSystem/PermissionHandler.cs +++ b/NWAPIPermissionSystem/PermissionHandler.cs @@ -162,12 +162,15 @@ public static bool CheckGroupPermission(Group group, string permission) if (group.CombinedPermissions.Contains(".*")) return true; string[] sp = permission.Split('.'); - if (sp.Length != 1) - if (group.CombinedPermissions.Contains(sp[0] + ".*")) - return true; if (sp.Length == 1) if (group.CombinedPermissions.Any(perm => perm.StartsWith(sp[0]))) return true; + if (sp.Length == 2) + if (group.CombinedPermissions.Contains(sp[0] + ".*")) + return true; + if (sp.Length == 3) + if (group.CombinedPermissions.Contains(sp[0] + "." + sp[1] + ".*")) + return true; foreach(var perm in group.CombinedPermissions) if (perm == permission) return true;