mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-10-25 15:52:36 -04:00 
			
		
		
		
	Format code
This commit is contained in:
		
							parent
							
								
									8ee4446b30
								
							
						
					
					
						commit
						ddad768cd8
					
				| @ -70,8 +70,14 @@ namespace Kyoo.Authentication | ||||
| 			PermissionOption options = | ||||
| 				new() | ||||
| 				{ | ||||
| 					Default = _configuration.GetValue("UNLOGGED_PERMISSIONS", "")!.Split(',').Where(x => x.Length > 0).ToArray(), | ||||
| 					NewUser = _configuration.GetValue("DEFAULT_PERMISSIONS", "overall.read,overall.play")!.Split(','), | ||||
| 					Default = _configuration | ||||
| 						.GetValue("UNLOGGED_PERMISSIONS", "")! | ||||
| 						.Split(',') | ||||
| 						.Where(x => x.Length > 0) | ||||
| 						.ToArray(), | ||||
| 					NewUser = _configuration | ||||
| 						.GetValue("DEFAULT_PERMISSIONS", "overall.read,overall.play")! | ||||
| 						.Split(','), | ||||
| 					RequireVerification = _configuration.GetValue( | ||||
| 						"REQUIRE_ACCOUNT_VERIFICATION", | ||||
| 						true | ||||
|  | ||||
| @ -61,7 +61,6 @@ public class UserRepository( | ||||
| 	{ | ||||
| 		// If no users exists, the new one will be an admin. Give it every permissions. | ||||
| 		if (!await database.Users.AnyAsync()) | ||||
| 
 | ||||
| 			obj.Permissions = PermissionOption.Admin; | ||||
| 		else if (!options.RequireVerification) | ||||
| 			obj.Permissions = options.NewUser; | ||||
|  | ||||
| @ -59,7 +59,8 @@ namespace Kyoo.Tests.Database | ||||
| 			SeasonRepository season = new(_NewContext(), thumbs.Object); | ||||
| 			LibraryItemRepository libraryItem = new(_NewConnection(), new(null)); | ||||
| 			EpisodeRepository episode = new(_NewContext(), show, thumbs.Object); | ||||
| 			UserRepository user = new(_NewContext(), _NewConnection(), new(null), thumbs.Object, new()); | ||||
| 			UserRepository user = | ||||
| 				new(_NewContext(), _NewConnection(), new(null), thumbs.Object, new()); | ||||
| 
 | ||||
| 			_repositories = new IBaseRepository[] | ||||
| 			{ | ||||
|  | ||||
| @ -29,5 +29,5 @@ export interface KyooErrors { | ||||
| 	 */ | ||||
| 	errors: string[]; | ||||
| 
 | ||||
| 	status: number | "aborted" | "parse" | "json" | ||||
| 	status?: number | "aborted" | "parse" | "json"; | ||||
| } | ||||
|  | ||||
| @ -20,7 +20,14 @@ | ||||
| 
 | ||||
| import { KyooErrors, useAccount } from "@kyoo/models"; | ||||
| import { P } from "@kyoo/primitives"; | ||||
| import { ReactElement, createContext, useContext, useEffect, useLayoutEffect, useState } from "react"; | ||||
| import { | ||||
| 	ReactElement, | ||||
| 	createContext, | ||||
| 	useContext, | ||||
| 	useEffect, | ||||
| 	useLayoutEffect, | ||||
| 	useState, | ||||
| } from "react"; | ||||
| import { View } from "react-native"; | ||||
| import { useYoshiki } from "yoshiki/native"; | ||||
| import { PermissionError } from "./unauthorized"; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user