mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix admin creation logic
This commit is contained in:
parent
6139deb175
commit
973685ec08
@ -106,7 +106,7 @@ namespace Kyoo.Authentication.Views
|
||||
User user = request.ToUser();
|
||||
user.Permissions = permissions.NewUser;
|
||||
// If no users exists, the new one will be an admin. Give it every permissions.
|
||||
if ((await users.GetAll(limit: new Pagination(1))).Any())
|
||||
if (!(await users.GetAll(limit: new Pagination(1))).Any())
|
||||
user.Permissions = PermissionOption.Admin;
|
||||
try
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user