mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Finding the issue in the validator of the local repository's edit
This commit is contained in:
parent
3a2294ed2d
commit
4a15fa8363
1
Kyoo.Common/.gitignore
vendored
1
Kyoo.Common/.gitignore
vendored
@ -136,7 +136,6 @@ publish/
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
@ -191,6 +191,8 @@ namespace Kyoo
|
||||
throw new ArgumentNullException(nameof(obj));
|
||||
if (genericType == null)
|
||||
throw new ArgumentNullException(nameof(genericType));
|
||||
if (!genericType.IsGenericType)
|
||||
throw new ArgumentException($"{nameof(genericType)} is not a generic type.");
|
||||
|
||||
IEnumerable<Type> types = genericType.IsInterface
|
||||
? obj.GetType().GetInterfaces()
|
||||
|
@ -231,8 +231,10 @@ namespace Kyoo.Controllers
|
||||
|
||||
foreach (PropertyInfo property in typeof(T).GetProperties()
|
||||
.Where(x => typeof(IEnumerable).IsAssignableFrom(x.PropertyType)
|
||||
&& !typeof(string).IsAssignableFrom(x.PropertyType)))
|
||||
&& !typeof(string).IsAssignableFrom(x.PropertyType))
|
||||
{
|
||||
// TODO For DE classes (like ShowDE), the basic ienumerable should not be verified (for exemple, GenreLinks should be checked & not Genres).
|
||||
Console.WriteLine($"Validating {property.Name}");
|
||||
object value = property.GetValue(resource);
|
||||
if (value == null || value is ICollection || Utility.IsOfGenericType(value, typeof(ICollection<>)))
|
||||
continue;
|
||||
|
1
Kyoo/.gitignore
vendored
1
Kyoo/.gitignore
vendored
@ -138,7 +138,6 @@ publish/
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
@ -112,7 +112,7 @@ namespace Kyoo
|
||||
|
||||
services.AddAuthorization(options =>
|
||||
{
|
||||
AuthorizationPolicyBuilder scheme = new AuthorizationPolicyBuilder(IdentityConstants.ApplicationScheme, JwtBearerDefaults.AuthenticationScheme);
|
||||
AuthorizationPolicyBuilder scheme = new(IdentityConstants.ApplicationScheme, JwtBearerDefaults.AuthenticationScheme);
|
||||
options.DefaultPolicy = scheme.RequireAuthenticatedUser().Build();
|
||||
|
||||
string[] permissions = {"Read", "Write", "Play", "Admin"};
|
||||
|
Loading…
x
Reference in New Issue
Block a user