do not show remove user or ban user if user is owner or moderator
This commit is contained in:
@@ -608,6 +608,11 @@ namespace MareSynchronos.UI
|
|||||||
_ = _apiController.SendChangeUserPinned(entry.GroupGID, entry.UserUID, !entry.IsPinned ?? false);
|
_ = _apiController.SendChangeUserPinned(entry.GroupGID, entry.UserUID, !entry.IsPinned ?? false);
|
||||||
}
|
}
|
||||||
UiShared.AttachToolTip("Pin this user to the Syncshell. Pinned users will not be deleted in case of a manually initiated Syncshell clean");
|
UiShared.AttachToolTip("Pin this user to the Syncshell. Pinned users will not be deleted in case of a manually initiated Syncshell clean");
|
||||||
|
|
||||||
|
var userIsMod = string.Equals(entry.UserUID, ownerUid, StringComparison.Ordinal);
|
||||||
|
var userIsOwner = string.Equals(entry.UserAlias, ownerUid, StringComparison.Ordinal);
|
||||||
|
if ((!entry.IsModerator ?? false) && !(userIsMod || userIsOwner))
|
||||||
|
{
|
||||||
if (UiShared.IconTextButton(FontAwesomeIcon.Trash, "Remove user"))
|
if (UiShared.IconTextButton(FontAwesomeIcon.Trash, "Remove user"))
|
||||||
{
|
{
|
||||||
if (UiShared.CtrlPressed())
|
if (UiShared.CtrlPressed())
|
||||||
@@ -616,11 +621,6 @@ namespace MareSynchronos.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var userIsMod = string.Equals(entry.UserUID, ownerUid, StringComparison.Ordinal);
|
|
||||||
var userIsOwner = string.Equals(entry.UserAlias, ownerUid, StringComparison.Ordinal);
|
|
||||||
if ((!entry.IsModerator ?? false) && !(userIsMod || userIsOwner))
|
|
||||||
{
|
|
||||||
|
|
||||||
UiShared.AttachToolTip("Hold CTRL and click to remove user " + (entry.UserAlias ?? entry.UserUID) + " from Syncshell");
|
UiShared.AttachToolTip("Hold CTRL and click to remove user " + (entry.UserAlias ?? entry.UserUID) + " from Syncshell");
|
||||||
if (UiShared.IconTextButton(FontAwesomeIcon.UserSlash, "Ban User"))
|
if (UiShared.IconTextButton(FontAwesomeIcon.UserSlash, "Ban User"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user