Hid away buttons that shouldn't be there for non-admins

This commit is contained in:
frikky
2022-05-23 03:11:50 +02:00
parent b51294fc2d
commit 0b71fbf232
+4 -1
View File
@@ -1442,7 +1442,7 @@ const Apps = (props) => {
</div> </div>
{isCloud ? null : ( {isCloud ? null : (
<span> <span>
{isLoading ? null : ( {props.userdata === undefined || props.userdata === null || props.userdata.role !== "admin" || isLoading ? null : (
<Tooltip <Tooltip
title={"Reload apps locally"} title={"Reload apps locally"}
style={{ marginTop: "28px", width: "100%" }} style={{ marginTop: "28px", width: "100%" }}
@@ -1466,6 +1466,8 @@ const Apps = (props) => {
</Button> </Button>
</Tooltip> </Tooltip>
)} )}
{props.userdata === undefined || props.userdata === null || props.userdata.role !== "admin" ? null :
<Tooltip <Tooltip
title={"Download from Github"} title={"Download from Github"}
style={{ marginTop: "28px", width: "100%" }} style={{ marginTop: "28px", width: "100%" }}
@@ -1489,6 +1491,7 @@ const Apps = (props) => {
)} )}
</Button> </Button>
</Tooltip> </Tooltip>
}
</span> </span>
)} )}
</div> </div>