Raids and RaidTemplates are now only editable by their owner or moderators
reworked user rights
This commit is contained in:
parent
cb683723b7
commit
2bf630f3a1
25 changed files with 258 additions and 270 deletions
|
@ -17,7 +17,7 @@
|
|||
<ValidationSummary />
|
||||
|
||||
|
||||
<AuthorizeView Policy="@Constants.Roles.Admin" Context="authorizationContext">
|
||||
<AuthorizeView Policy="@Constants.Roles.Admin.Name" Context="authorizationContext">
|
||||
<Authorized>
|
||||
<p>@_submitMessage</p>
|
||||
<p>
|
||||
|
@ -44,21 +44,18 @@
|
|||
<tr>
|
||||
<th></th>
|
||||
<th>Role</th>
|
||||
<th>IsSystemRole</th>
|
||||
<th>Type</th>
|
||||
</tr>
|
||||
@foreach (LiebRole role in _roles)
|
||||
{
|
||||
<tr>
|
||||
@{
|
||||
bool hasRole = _user.RoleAssignments.Where(a => a.LiebRoleId == role.LiebRoleId).Any();
|
||||
bool disabled = _editingUserRights < role.LevelToAssign;
|
||||
bool disabled = _editingUserRights < role.LevelToAssign || role.Type == RoleType.GuildRole;
|
||||
}
|
||||
<td><input type="checkbox" disabled="@disabled" checked="@hasRole" @onchange="args => RoleStatusChanged(role, args)" /></td>
|
||||
<td>@role.RoleName</td>
|
||||
@if(@role.IsSystemRole)
|
||||
{
|
||||
<td>True</td>
|
||||
}
|
||||
<td>@role.Type.ToString()</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue