mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-19 03:31:29 +00:00
Add ability to change user's permissions from admin panel user list
This commit is contained in:
parent
ff12f5f7d5
commit
1037a6eddb
6 changed files with 44 additions and 3 deletions
|
@ -21,7 +21,11 @@ public class AdminPanelUsersPage : BaseLayout
|
|||
if (user == null) return this.Redirect("~/login");
|
||||
if (!user.IsAdmin) return this.NotFound();
|
||||
|
||||
this.Users = await this.Database.Users.OrderByDescending(u => u.UserId).ToListAsync();
|
||||
this.Users = await this.Database.Users
|
||||
.OrderByDescending(u => u.PermissionLevel)
|
||||
.ThenByDescending(u => u.UserId)
|
||||
.ToListAsync();
|
||||
|
||||
this.UserCount = this.Users.Count;
|
||||
|
||||
return this.Page();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue