Skip to content

Commit

Permalink
151307- Remove condition that will draft content on opening content w…
Browse files Browse the repository at this point in the history
…ithout changing anything for ORG_ADMIN
  • Loading branch information
yashveertrigyn committed May 9, 2024
1 parent bab1f67 commit 0c3031d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class CollectionEditorComponent implements OnInit, OnDestroy {
const lockInfo = _.pick(this.queryParams, 'lockKey', 'expiresAt', 'expiresIn');
const allowedEditState = ['draft', 'allcontent', 'collaborating-on', 'uploaded', 'alltextbooks'].includes(this.routeParams.state);
const allowedEditStatus = this.routeParams.contentStatus ? ['draft'].includes(this.routeParams.contentStatus.toLowerCase()) : false;
if (_.isEmpty(lockInfo) && allowedEditState && ( allowedEditStatus || this.userService.userProfile.rootOrgAdmin )) {
if (_.isEmpty(lockInfo) && allowedEditState && allowedEditStatus) {
return combineLatest(
this.tenantService.tenantData$,
this.getCollectionDetails(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class NewCollectionEditorComponent implements OnInit, OnDestroy {
const lockInfo = _.pick(this.queryParams, 'lockKey', 'expiresAt', 'expiresIn');
const allowedEditState = ['draft', 'allcontent', 'collaborating-on', 'uploaded', 'alltextbooks'].includes(this.routeParams.state);
const allowedEditStatus = this.routeParams.contentStatus ? ['draft'].includes(this.routeParams.contentStatus.toLowerCase()) : false;
if (_.isEmpty(lockInfo) && allowedEditState && ( allowedEditStatus || this.userService.userProfile.rootOrgAdmin )) {
if (_.isEmpty(lockInfo) && allowedEditState && allowedEditStatus) {
return combineLatest(
this.getCollectionDetails(),
this.editorService.getOwnershipType(),
Expand Down

0 comments on commit 0c3031d

Please sign in to comment.