feat: hide studio button for limited staff (#1436)
This commit is contained in:
@@ -57,6 +57,7 @@ const InstructorToolbar = (props) => {
|
||||
const {
|
||||
courseId,
|
||||
unitId,
|
||||
isStudioButtonVisible,
|
||||
tab,
|
||||
} = props;
|
||||
|
||||
@@ -74,13 +75,13 @@ const InstructorToolbar = (props) => {
|
||||
<div className="align-items-center flex-grow-1 d-md-flex mx-1 my-1">
|
||||
<MasqueradeWidget courseId={courseId} onError={showMasqueradeError} />
|
||||
</div>
|
||||
{(urlStudio || urlInsights) && (
|
||||
{((urlStudio && isStudioButtonVisible) || urlInsights) && (
|
||||
<>
|
||||
<hr className="border-light" />
|
||||
<span className="mr-2 mt-1 col-form-label"><FormattedMessage {...messages.titleViewCourseIn} /></span>
|
||||
</>
|
||||
)}
|
||||
{urlStudio && (
|
||||
{urlStudio && isStudioButtonVisible && (
|
||||
<span className="mx-1 my-1">
|
||||
<a className="btn btn-inverse-outline-primary" href={urlStudio}>{formatMessage(messages.titleStudio)}</a>
|
||||
</span>
|
||||
@@ -116,12 +117,14 @@ const InstructorToolbar = (props) => {
|
||||
InstructorToolbar.propTypes = {
|
||||
courseId: PropTypes.string,
|
||||
unitId: PropTypes.string,
|
||||
isStudioButtonVisible: PropTypes.bool,
|
||||
tab: PropTypes.string,
|
||||
};
|
||||
|
||||
InstructorToolbar.defaultProps = {
|
||||
courseId: undefined,
|
||||
unitId: undefined,
|
||||
isStudioButtonVisible: true,
|
||||
tab: '',
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user