示例#1
0
 public bool HasRole(RbacRole targetRole)
 {
     if (Name == targetRole.Name)
     {
         return(true);
     }
     return(SubRoles.Any((RbacRole subRole) => subRole.HasRole(targetRole)));
 }
示例#2
0
 public bool HasRole(RbacRole targetRole)
 {
     return(Roles.Any((RbacRole role) => role.HasRole(targetRole)));
 }