mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-27 17:42:29 -04:00
Format code
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user