mirror of https://github.com/LemmyNet/lemmy.git
Remove options for appoint as admin / mod, and transfer site for (#1065)
non-federated users. #647pull/1066/head
parent
ddefc06fbc
commit
1d8183fe5f
|
@ -475,6 +475,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
{!node.comment.banned_from_community &&
|
{!node.comment.banned_from_community &&
|
||||||
|
node.comment.creator_local &&
|
||||||
(!this.state.showConfirmAppointAsMod ? (
|
(!this.state.showConfirmAppointAsMod ? (
|
||||||
<button
|
<button
|
||||||
class="btn btn-link btn-animate text-muted"
|
class="btn btn-link btn-animate text-muted"
|
||||||
|
@ -517,6 +518,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
|
||||||
{/* Community creators and admins can transfer community to another mod */}
|
{/* Community creators and admins can transfer community to another mod */}
|
||||||
{(this.amCommunityCreator || this.canAdmin) &&
|
{(this.amCommunityCreator || this.canAdmin) &&
|
||||||
this.isMod &&
|
this.isMod &&
|
||||||
|
node.comment.creator_local &&
|
||||||
(!this.state.showConfirmTransferCommunity ? (
|
(!this.state.showConfirmTransferCommunity ? (
|
||||||
<button
|
<button
|
||||||
class="btn btn-link btn-animate text-muted"
|
class="btn btn-link btn-animate text-muted"
|
||||||
|
@ -579,6 +581,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
{!node.comment.banned &&
|
{!node.comment.banned &&
|
||||||
|
node.comment.creator_local &&
|
||||||
(!this.state.showConfirmAppointAsAdmin ? (
|
(!this.state.showConfirmAppointAsAdmin ? (
|
||||||
<button
|
<button
|
||||||
class="btn btn-link btn-animate text-muted"
|
class="btn btn-link btn-animate text-muted"
|
||||||
|
@ -621,6 +624,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
|
||||||
{/* Site Creator can transfer to another admin */}
|
{/* Site Creator can transfer to another admin */}
|
||||||
{this.amSiteCreator &&
|
{this.amSiteCreator &&
|
||||||
this.isAdmin &&
|
this.isAdmin &&
|
||||||
|
node.comment.creator_local &&
|
||||||
(!this.state.showConfirmTransferSite ? (
|
(!this.state.showConfirmTransferSite ? (
|
||||||
<button
|
<button
|
||||||
class="btn btn-link btn-animate text-muted"
|
class="btn btn-link btn-animate text-muted"
|
||||||
|
|
|
@ -757,7 +757,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
)}
|
)}
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
{!post.banned_from_community && (
|
{!post.banned_from_community && post.creator_local && (
|
||||||
<li className="list-inline-item">
|
<li className="list-inline-item">
|
||||||
<span
|
<span
|
||||||
class="pointer"
|
class="pointer"
|
||||||
|
@ -775,45 +775,47 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{/* Community creators and admins can transfer community to another mod */}
|
{/* Community creators and admins can transfer community to another mod */}
|
||||||
{(this.amCommunityCreator || this.canAdmin) && this.isMod && (
|
{(this.amCommunityCreator || this.canAdmin) &&
|
||||||
<li className="list-inline-item">
|
this.isMod &&
|
||||||
{!this.state.showConfirmTransferCommunity ? (
|
post.creator_local && (
|
||||||
<span
|
<li className="list-inline-item">
|
||||||
class="pointer"
|
{!this.state.showConfirmTransferCommunity ? (
|
||||||
onClick={linkEvent(
|
|
||||||
this,
|
|
||||||
this.handleShowConfirmTransferCommunity
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{i18n.t('transfer_community')}
|
|
||||||
</span>
|
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
<span class="d-inline-block mr-1">
|
|
||||||
{i18n.t('are_you_sure')}
|
|
||||||
</span>
|
|
||||||
<span
|
<span
|
||||||
class="pointer d-inline-block mr-1"
|
class="pointer"
|
||||||
onClick={linkEvent(
|
onClick={linkEvent(
|
||||||
this,
|
this,
|
||||||
this.handleTransferCommunity
|
this.handleShowConfirmTransferCommunity
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{i18n.t('yes')}
|
{i18n.t('transfer_community')}
|
||||||
</span>
|
</span>
|
||||||
<span
|
) : (
|
||||||
class="pointer d-inline-block"
|
<>
|
||||||
onClick={linkEvent(
|
<span class="d-inline-block mr-1">
|
||||||
this,
|
{i18n.t('are_you_sure')}
|
||||||
this.handleCancelShowConfirmTransferCommunity
|
</span>
|
||||||
)}
|
<span
|
||||||
>
|
class="pointer d-inline-block mr-1"
|
||||||
{i18n.t('no')}
|
onClick={linkEvent(
|
||||||
</span>
|
this,
|
||||||
</>
|
this.handleTransferCommunity
|
||||||
)}
|
)}
|
||||||
</li>
|
>
|
||||||
)}
|
{i18n.t('yes')}
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="pointer d-inline-block"
|
||||||
|
onClick={linkEvent(
|
||||||
|
this,
|
||||||
|
this.handleCancelShowConfirmTransferCommunity
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{i18n.t('no')}
|
||||||
|
</span>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
{/* Admins can ban from all, and appoint other admins */}
|
{/* Admins can ban from all, and appoint other admins */}
|
||||||
{this.canAdmin && (
|
{this.canAdmin && (
|
||||||
<>
|
<>
|
||||||
|
@ -836,7 +838,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
)}
|
)}
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
{!post.banned && (
|
{!post.banned && post.creator_local && (
|
||||||
<li className="list-inline-item">
|
<li className="list-inline-item">
|
||||||
<span
|
<span
|
||||||
class="pointer"
|
class="pointer"
|
||||||
|
|
Loading…
Reference in New Issue