Remove options for appoint as admin / mod, and transfer site for

non-federated users. #647
This commit is contained in:
Dessalines 2020-08-07 11:21:01 -04:00
parent ce8622b9cd
commit 57f1e33126
2 changed files with 41 additions and 35 deletions

View file

@ -475,6 +475,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
</button>
))}
{!node.comment.banned_from_community &&
node.comment.creator_local &&
(!this.state.showConfirmAppointAsMod ? (
<button
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 */}
{(this.amCommunityCreator || this.canAdmin) &&
this.isMod &&
node.comment.creator_local &&
(!this.state.showConfirmTransferCommunity ? (
<button
class="btn btn-link btn-animate text-muted"
@ -579,6 +581,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
</button>
))}
{!node.comment.banned &&
node.comment.creator_local &&
(!this.state.showConfirmAppointAsAdmin ? (
<button
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 */}
{this.amSiteCreator &&
this.isAdmin &&
node.comment.creator_local &&
(!this.state.showConfirmTransferSite ? (
<button
class="btn btn-link btn-animate text-muted"

View file

@ -757,7 +757,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
)}
</li>
)}
{!post.banned_from_community && (
{!post.banned_from_community && post.creator_local && (
<li className="list-inline-item">
<span
class="pointer"
@ -775,7 +775,9 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
</>
)}
{/* Community creators and admins can transfer community to another mod */}
{(this.amCommunityCreator || this.canAdmin) && this.isMod && (
{(this.amCommunityCreator || this.canAdmin) &&
this.isMod &&
post.creator_local && (
<li className="list-inline-item">
{!this.state.showConfirmTransferCommunity ? (
<span
@ -836,7 +838,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
)}
</li>
)}
{!post.banned && (
{!post.banned && post.creator_local && (
<li className="list-inline-item">
<span
class="pointer"