mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 02:56:20 -05:00
changed the meaning of canCreateNew to true creation
This commit is contained in:
parent
e03f83466e
commit
d713249bee
1 changed files with 2 additions and 3 deletions
|
@ -547,7 +547,6 @@ Preview.defaultProps = {
|
|||
const mapStateToProps = state => {
|
||||
const projectInfoPresent = state.preview.projectInfo &&
|
||||
Object.keys(state.preview.projectInfo).length > 0 && state.preview.projectInfo.id > 0;
|
||||
const projectIsDefault = (state.projectId === '0');
|
||||
const userPresent = state.session.session.user !== null &&
|
||||
typeof state.session.session.user !== 'undefined' &&
|
||||
Object.keys(state.session.session.user).length > 0;
|
||||
|
@ -561,10 +560,10 @@ const mapStateToProps = state => {
|
|||
|
||||
return {
|
||||
canAddToStudio: userOwnsProject,
|
||||
canCreateNew: true,
|
||||
canCreateNew: isLoggedIn,
|
||||
canRemix: isLoggedIn && projectInfoPresent && !userOwnsProject,
|
||||
canReport: isLoggedIn && !userOwnsProject,
|
||||
canSave: isLoggedIn && (userOwnsProject || projectIsDefault), // can save a new project
|
||||
canSave: isLoggedIn && userOwnsProject,
|
||||
canSaveAsCopy: userOwnsProject && projectInfoPresent,
|
||||
canShare: userOwnsProject && state.permissions.social,
|
||||
comments: state.preview.comments,
|
||||
|
|
Loading…
Reference in a new issue