mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-02 21:24:20 -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 user = request.ToUser();
|
||||||
user.Permissions = permissions.NewUser;
|
user.Permissions = permissions.NewUser;
|
||||||
// If no users exists, the new one will be an admin. Give it every permissions.
|
// 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;
|
user.Permissions = PermissionOption.Admin;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user